Class BranchingInputStream

    • Constructor Detail

      • BranchingInputStream

        protected BranchingInputStream​(BranchingInputStream parent)
        Initialise the BranchingInputStream with the specified parent.
        Parameters:
        parent - The parent stream, or null if it is the trunk.
    • Method Detail

      • branch

        public abstract BranchingInputStream branch()
                                             throws IOException
        Creates a new branch at this stream's current position. The returned stream will have this stream as its parent.
        Returns:
        a new branching stream, in the same position as this branch.
        Throws:
        IOException - if an I/O exception occurs.
      • copy

        public abstract BranchingInputStream copy()
                                           throws IOException
        Creates a twin of this stream at this stream's current position. The returned stream will have the same parent as this stream.
        Returns:
        a new twin stream, in the same position as this branch.
        Throws:
        IOException - if an I/O exception occurs.
      • parent

        public BranchingInputStream parent()
        Returns the parent branching input stream from which this branch was created, or null if this is the trunk.
        Returns:
        the parent branching input stream from which this branch was created, or null if this is the trunk.