Package com.oracle.bmc.io.internal
Class DuplicatableLengthLimitedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.oracle.bmc.io.internal.LengthLimitedInputStream
-
- com.oracle.bmc.io.internal.DuplicatableLengthLimitedInputStream
-
- All Implemented Interfaces:
DuplicatableInputStream,Closeable,AutoCloseable
public class DuplicatableLengthLimitedInputStream extends LengthLimitedInputStream implements DuplicatableInputStream
LengthLimitedInputStream that is Duplicatable, see DuplicatableKeepOpenInputStream for additional commentary.
-
-
Field Summary
-
Fields inherited from class com.oracle.bmc.io.internal.LengthLimitedInputStream
length
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description DuplicatableLengthLimitedInputStream(InputStream inputStream, long length)Creates a LengthLimitedInputStream while retaining its marking as a DuplicatableInputStream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamduplicate()Produces a duplicate stream of the source (from its start) that can be used in parallel to the original stream (ie, thread safe).-
Methods inherited from class com.oracle.bmc.io.internal.LengthLimitedInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
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:DuplicatableInputStreamProduces a duplicate stream of the source (from its start) that can be used in parallel to the original stream (ie, thread safe).- Specified by:
duplicatein interfaceDuplicatableInputStream- Returns:
- A new input stream instance.
-
-