public class ByteArrayRandomAccessData extends Object implements RandomAccessData
RandomAccessData implementation backed by a byte array.| Constructor and Description |
|---|
ByteArrayRandomAccessData(byte[] bytes) |
ByteArrayRandomAccessData(byte[] bytes,
long offset,
long length) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Returns an
InputStream that can be used to read the underling 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. |
public ByteArrayRandomAccessData(byte[] bytes)
public ByteArrayRandomAccessData(byte[] bytes,
long offset,
long length)
public InputStream getInputStream()
RandomAccessDataInputStream that can be used to read the underling data. The
caller is responsible close the underlying stream.getInputStream in interface RandomAccessDatapublic RandomAccessData getSubsection(long offset, long length)
RandomAccessDataRandomAccessData for a specific subsection of this data.getSubsection in interface RandomAccessDataoffset - the offset of the subsectionlength - the length of the subsectionpublic long getSize()
RandomAccessDatagetSize in interface RandomAccessDataCopyright © 2013. All rights reserved.