Class FileBranchingStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public final class FileBranchingStream
    extends BranchingInputStream
    A BranchingInputStream for reading from files. Uses a FileInputStream to read from the file, but tracks the position read to so that branches can skip to the same location.

    This stream would be most suited for when a large file is expected to piped straight to output, without modification and minimal branching. If the stream is not a large file, is going to be modified by filters, or is going to have substantial branching, a wrapper BranchingInputStream could be considered instead.

    See Also:
    IO.newBranchingInputStream(java.io.InputStream, org.forgerock.util.Factory)