Prints the header for a path mapping state.

@param IO  $io               The I/O
@param int $pathMappingState The {@link PathMappingState} constant
494780
private function printPathMappingStateHeader(IO $io, $pathMappingState)
    {
        switch ($pathMappingState) {
            case PathMappingState::ENABLED:
                $io->writeLine('The following path mappings are currently enabled:');
                $io->writeLine('');

                return;
            case PathMappingState::NOT_FOUND:
                $io->writeLine('The target paths of the following path mappings were not found:');
                $io->writeLine('');

                return;
            case PathMappingState::CONFLICT:
                $io->writeLine('Some path mappings have conflicting paths:');
                $io->writeLine(' (add the module names to the "override-order" key in puli.json to resolve)');
                $io->writeLine('');

                return;
        }
    }
180122
public synchronized void initPathToResourceBundleMap(List<JoinableResourceBundle> bundles) throws IOException {

		for (JoinableResourceBundle bundle : bundles) {

			// Remove bundle reference from existing mapping if exists
			removePathMappingFromPathMap(bundle);

			List<PathMapping> mappings = bundle.getMappings();
			for (PathMapping pathMapping : mappings) {
				register(pathMapping);
			}

			// Register file path mapping for linked resources
			List<FilePathMapping> fMappings = bundle.getLinkedFilePathMappings();
			for (FilePathMapping fMapping : fMappings) {
				register(fMapping);
			}
		}
	}
1025436
public void saveState (Path dir, State state) throws IOException {
    saveState(this.fs, dir, state);
  }
482908
void setOutputState(int s)
        throws IOException
    {
        if (s<0)
        {
            _outputState=DISABLED;
            if (_writer!=null)
                _writer.disable();
            _writer=null;
            if (_out!=null)
                _out.disable();
            _out=null;
        }
        else
            _outputState=s;
    }
317968
@Override
    protected void write(EncodingState encodingState, String str, int off, int len) throws IOException {
        target.write(str, off, len);
    }
802769
protected static function printMessage(
        OutputInterface $output,
        $header,
        $body
    ) {
        self::printStructureMessage(
            $output,
            $header,
            $body,
            'line'
        );
    }
442807
public T header(String title, Iterable<HtmlResource> resources) throws IOException {
		return (T) begin("html")
			.begin("head")
			.begin("title").text("Simon Console: ").text(title).end("title")
			.resources(resources)
			.end("head")
			.begin("body")
			.begin("h1")
			.write("<img id=\"logo\" src=\"../resource/images/logo.png\" alt=\"Logo\" />")
			.text("Simon Console: ").text(title)
			.end("h1");
	}
680951
protected function printMessage(
        OutputInterface $output,
        $header,
        $body
    ) {
        $message = sprintf(
            '<header>%s</header> <body>%s</body>',
            '[' . $header . ']',
            $body
        );
        $output->writeln($message);
    }
827626
public void writeExternal(ObjectOutput out) throws IOException {
		super.writeExternal(out);
		if(linkedRequest == null) {
			out.writeBoolean(false);
		} else {
			out.writeBoolean(true);
			out.writeObject(linkedRequest);
		}
		out.writeBoolean(createDialog);
		if(routingDirective != null) {
			out.writeUTF(routingDirective.toString());
		} else {
			out.writeUTF("");
		}
		if(routingState != null) {
			out.writeUTF(routingState.toString());
		} else {
			out.writeUTF("");
		}
		if(routingRegion != null) {
			out.writeBoolean(true);
			out.writeObject(routingRegion);
		} else {
			out.writeBoolean(false);
		}
		out.writeBoolean(isInitial);
		if(logger.isDebugEnabled()) {
            logger.debug("writeExternal - isInitial=" + isInitial);
        }
		out.writeBoolean(isFinalResponseGenerated);
		out.writeBoolean(is1xxResponseGenerated);
	}
178041
public static void writeFstToBinaryStream(Fst fst, ObjectOutput out) throws IOException {
    out.writeInt(CURRENT_VERSION);
    writeStringMap(fst.getInputSymbols(), out);
    writeStringMap(fst.getOutputSymbols(), out);
    out.writeBoolean(fst.isUsingStateSymbols()); // whether or not we used a state symbol table
    if (fst.isUsingStateSymbols()) {
      writeStringMap(fst.getStateSymbols(), out);
    }
    out.writeInt(fst.getStartState().getId());

    out.writeObject(fst.getSemiring());
    out.writeInt(fst.getStateCount());

    Map<State, Integer> stateMap = new IdentityHashMap<>(fst.getStateCount());
    for (int i = 0; i < fst.getStateCount(); i++) {
      State s = fst.getState(i);
      out.writeInt(s.getArcCount());
      out.writeDouble(s.getFinalWeight());
      out.writeInt(s.getId());
      stateMap.put(s, i);
    }

    int numStates = fst.getStateCount();
    for (int i = 0; i < numStates; i++) {
      State s = fst.getState(i);
      int numArcs = s.getArcCount();
      for (int j = 0; j < numArcs; j++) {
        Arc a = s.getArc(j);
        out.writeInt(a.getIlabel());
        out.writeInt(a.getOlabel());
        out.writeDouble(a.getWeight());
        out.writeInt(stateMap.get(a.getNextState()));
      }
    }
  }
1348907
protected void serialize(DataTree dt,Map<Long, Long> sessions,
            OutputArchive oa, FileHeader header) throws IOException {
        // this is really a programmatic error and not something that can
        // happen at runtime
        if(header==null)
            throw new IllegalStateException(
                    "Snapshot's not open for writing: uninitialized header");
        header.serialize(oa, "fileheader");
        SerializeUtils.serializeSnapshot(dt,oa,sessions);
    }
930920
private void init(
            final Path output, final SAMFileHeader header, final boolean writeHeader,
            final TaskAttemptContext ctx)
            throws IOException
    {
        init(
                output.getFileSystem(ctx.getConfiguration()).create(output),
                header, writeHeader, ctx);
    }
74060
public void writeMapBegin(String type)
        throws IOException
    {
        os.write('M');
        os.write('t');
        printLenString(type);
    }
942337
public function render(IO $io, $indentation = 0)
    {
        $layout = new BlockLayout();

        $this->renderHelp($layout);

        $layout->render($io, $indentation);
    }
1225314
@Override
    public void write(int ch)
        throws IOException
    {
        ch = ch & 0xff;

        _os.write(ch);

        try {
            _state.next(ch);
        } catch (Exception e) {
            log.log(Level.WARNING, e.toString(), e);
        }
    }
88567
protected void printLine(State state, Writer pw, String externalForm, String hash) throws IOException {
        pw.write(externalForm);
        pw.write(SEPARATOR);
        pw.write(hash);
        pw.write('\n');
    }
577444
public void startPart(String contentType, String[] headers) throws IOException {
        if (inPart)
            out.write(__CRLF);
        out.write(__DASHDASH);
        out.write(boundary);
        out.write(__CRLF);
        out.write("Content-Type: ");
        out.write(contentType);
        out.write(__CRLF);
        for (int i = 0; headers != null && i < headers.length; i++) {
            out.write(headers[i]);
            out.write(__CRLF);
        }
        out.write(__CRLF);
        inPart = true;
    }