Package com.emc.object.util
Class InputStreamSegment
- java.lang.Object
-
- java.io.InputStream
-
- com.emc.rest.util.SizedInputStream
-
- com.emc.object.util.InputStreamSegment
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class InputStreamSegment extends com.emc.rest.util.SizedInputStream
Takes a specific segment of a providedInputStream
by seeking to theoffset
and providing onlylength
bytes.
-
-
Constructor Summary
Constructors Constructor Description InputStreamSegment(java.io.InputStream inputStream, long offset, long length)
NOTE: This will seek into the provided stream byoffset
bytes using repeated calls toInputStream.skip(long)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getOffset()
-
Methods inherited from class com.emc.rest.util.SizedInputStream
available, close, getRead, getSize, mark, markSupported, read, read, read, remaining, reset, skip
-
-
-
-
Constructor Detail
-
InputStreamSegment
public InputStreamSegment(java.io.InputStream inputStream, long offset, long length) throws java.io.IOException
NOTE: This will seek into the provided stream byoffset
bytes using repeated calls toInputStream.skip(long)
. Be sure this is what you want.- Throws:
java.io.IOException
-
-