Class DuplicatableLengthLimitedInputStream

    • Constructor Detail

      • DuplicatableLengthLimitedInputStream

        public DuplicatableLengthLimitedInputStream​(InputStream inputStream,
                                                    long length)
        Creates a LengthLimitedInputStream while retaining its marking as a DuplicatableInputStream
        Parameters:
        inputStream - The DuplicatableInputStream that will be kept open. This is checked with instanceof.
        length - the length to which the InputStream will be limited
    • Method Detail

      • duplicate

        public InputStream duplicate()
        Description copied from interface: DuplicatableInputStream
        Produces a duplicate stream of the source (from its start) that can be used in parallel to the original stream (ie, thread safe).
        Specified by:
        duplicate in interface DuplicatableInputStream
        Returns:
        A new input stream instance.