net.netheos.pcsapi.bytesio
Class RangeByteSource
java.lang.Object
net.netheos.pcsapi.bytesio.RangeByteSource
- All Implemented Interfaces:
- ByteSource
public class RangeByteSource
- extends Object
- implements ByteSource
A byte source view of a range of bytes from an underlying byte source.
TODO : only 1 RangeByteSource is acceptable in pipeline, because of seek()
|
Method Summary |
long |
length()
Return length of stream (must be known before consuming stream) |
InputStream |
openStream()
Returns a ByteSourceStream object for reading data, to be closed by caller |
String |
toString()
|
RangeByteSource
public RangeByteSource(ByteSource source)
RangeByteSource
public RangeByteSource(ByteSource source,
long startOffset)
RangeByteSource
public RangeByteSource(ByteSource source,
long startOffset,
long length)
openStream
public InputStream openStream()
throws IOException
- Description copied from interface:
ByteSource
- Returns a ByteSourceStream object for reading data, to be closed by caller
- Specified by:
openStream in interface ByteSource
- Returns:
- the underlying stream
- Throws:
IOException
length
public long length()
- Description copied from interface:
ByteSource
- Return length of stream (must be known before consuming stream)
- Specified by:
length in interface ByteSource
- Returns:
- The stream bytes count
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014. All Rights Reserved.