RandomAccessReader for a ByteBuffer. Reads in little endian order, as required by the
zipfile format.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | byteBuffer
The byte buffer. |
| private final int | sliceLength
The slice length. |
| private final int | sliceStartPos
The slice start pos. |
| Access | Constructor and Description |
|---|---|
| public | RandomAccessByteBufferReader(final ByteBuffer
the byte buffer byteBuffer, final long the slice start pos sliceStartPos, final long the slice length sliceLength)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public int | read(final long
The offset to start reading from. srcOffset, final byte[] The byte array to write into. dstArr, final int The offset within the destination array to start writing at. dstArrStart, final int The number of bytes to read. numBytes)Implements nonapi. Read bytes into a byte array. |
| public int | read(final long
The offset to start reading from. srcOffset, final ByteBuffer The dstBuf, final int ByteBuffer to write into.The offset within the destination buffer to start writing at. dstBufStart, final int The number of bytes to read. numBytes)Implements nonapi. Read bytes into a |
| public byte | readByte(final long
The buffer offset to read from. offset)Implements nonapi. Read a byte at a specific offset (without changing the current cursor offset). |
| public int | readInt(final long
The buffer offset to read from. offset)Implements nonapi. Read a int at a specific offset (without changing the current cursor offset). |
| public long | readLong(final long
The buffer offset to read from. offset)Implements nonapi. Read a long at a specific offset (without changing the current cursor offset). |
| public short | readShort(final long
The buffer offset to read from. offset)Implements nonapi. Read a short at a specific offset (without changing the current cursor offset). |
| public String | readString(final long
The start offset of the string. offset, final int The number of bytes of the UTF8 encoding of the string. numBytes, final boolean If true, replace '/' with '.'. replaceSlashWithDot, final boolean If true, string final ';' character. stripLSemicolon)Implements nonapi. Reads the "modified UTF8" format defined in the Java classfile spec, optionally replacing '/' with '.', and optionally removing the prefix "L" and the suffix ";". |
| public String | readString(final long
The start offset of the string. offset, final int The number of bytes of the UTF8 encoding of the string. numBytes)Implements nonapi. Reads the "modified UTF8" format defined in the Java classfile spec. |
| public int | readUnsignedByte(final long
The buffer offset to read from. offset)Implements nonapi. Read an unsigned byte at a specific offset (without changing the current cursor offset). |
| public long | readUnsignedInt(final long
The buffer offset to read from. offset)Implements nonapi. Read a unsigned int at a specific offset (without changing the current cursor offset). |
| public int | readUnsignedShort(final long
The buffer offset to read from. offset)Implements nonapi. Read a unsigned short at a specific offset (without changing the current cursor offset). |
| byteBuffer | back to summary |
|---|---|
| private final ByteBuffer byteBuffer The byte buffer. | |
| sliceLength | back to summary |
|---|---|
| private final int sliceLength The slice length. | |
| sliceStartPos | back to summary |
|---|---|
| private final int sliceStartPos The slice start pos. | |
| RandomAccessByteBufferReader | back to summary |
|---|---|
| public RandomAccessByteBufferReader(final ByteBuffer byteBuffer, final long sliceStartPos, final long sliceLength) Constructor.
| |
| read | back to summary |
|---|---|
| public int read(final long srcOffset, final byte[] dstArr, final int dstArrStart, final int numBytes) throws IOException Implements nonapi. Doc from nonapi. Read bytes into a byte array.
| |
| read | back to summary |
|---|---|
| public int read(final long srcOffset, final ByteBuffer dstBuf, final int dstBufStart, final int numBytes) throws IOException Implements nonapi. Doc from nonapi. Read bytes into a
| |
| readByte | back to summary |
|---|---|
| public byte readByte(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read a byte at a specific offset (without changing the current cursor offset).
| |
| readInt | back to summary |
|---|---|
| public int readInt(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read a int at a specific offset (without changing the current cursor offset).
| |
| readLong | back to summary |
|---|---|
| public long readLong(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read a long at a specific offset (without changing the current cursor offset).
| |
| readShort | back to summary |
|---|---|
| public short readShort(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read a short at a specific offset (without changing the current cursor offset).
| |
| readString | back to summary |
|---|---|
| public String readString(final long offset, final int numBytes, final boolean replaceSlashWithDot, final boolean stripLSemicolon) throws IOException Implements nonapi. Doc from nonapi. Reads the "modified UTF8" format defined in the Java classfile spec, optionally replacing '/' with '.', and optionally removing the prefix "L" and the suffix ";".
| |
| readString | back to summary |
|---|---|
| public String readString(final long offset, final int numBytes) throws IOException Implements nonapi. Doc from nonapi. Reads the "modified UTF8" format defined in the Java classfile spec.
| |
| readUnsignedByte | back to summary |
|---|---|
| public int readUnsignedByte(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read an unsigned byte at a specific offset (without changing the current cursor offset).
| |
| readUnsignedInt | back to summary |
|---|---|
| public long readUnsignedInt(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read a unsigned int at a specific offset (without changing the current cursor offset).
| |
| readUnsignedShort | back to summary |
|---|---|
| public int readUnsignedShort(final long offset) throws IOException Implements nonapi. Doc from nonapi. Read a unsigned short at a specific offset (without changing the current cursor offset).
| |