public interface RandomAccessData
限定符和类型 | 接口和说明 |
---|---|
static class |
RandomAccessData.ResourceAccess
Lock modes for accessing the underlying resource.
|
限定符和类型 | 方法和说明 |
---|---|
java.io.InputStream |
getInputStream(RandomAccessData.ResourceAccess access)
Returns an
InputStream that can be used to read the underlying data. |
long |
getSize()
Returns the size of the data.
|
RandomAccessData |
getSubsection(long offset,
long length)
Returns a new
RandomAccessData for a specific subsection of this data. |
java.io.InputStream getInputStream(RandomAccessData.ResourceAccess access) throws java.io.IOException
InputStream
that can be used to read the underlying data. The
caller is responsible close the underlying stream.access
- hint indicating how the underlying data should be accessedjava.io.IOException
- if the stream cannot be openedRandomAccessData getSubsection(long offset, long length)
RandomAccessData
for a specific subsection of this data.offset
- the offset of the subsectionlength
- the length of the subsectionlong getSize()