public interface BytesInput<T extends BytesInput<T>>
This interface exposes methods for reading bytes from specific positions in a byte array.
| Modifier and Type | Method and Description |
|---|---|
T |
read(long offset,
byte[] dst,
long dstOffset,
long length)
Reads bytes into the given byte array starting at the given offset up to the given length.
|
T |
read(long offset,
Bytes dst,
long dstOffset,
long length)
Reads bytes into the given byte array starting at the given offset up to the given length.
|
boolean |
readBoolean(long offset)
Reads a 1 byte boolean from the buffer at the given offset.
|
int |
readByte(long offset)
Reads a byte from the buffer at the given offset.
|
char |
readChar(long offset)
Reads a 16-bit character from the buffer at the given offset.
|
double |
readDouble(long offset)
Reads a double-precision 64-bit floating point number from the buffer at the given offset.
|
float |
readFloat(long offset)
Reads a single-precision 32-bit floating point number from the buffer at the given offset.
|
int |
readInt(long offset)
Reads a 32-bit signed integer from the buffer at the given offset.
|
long |
readLong(long offset)
Reads a 64-bit signed integer from the buffer at the given offset.
|
int |
readMedium(long offset)
Reads a 24-bit signed integer from the buffer at the given offset.
|
short |
readShort(long offset)
Reads a 16-bit signed integer from the buffer at the given offset.
|
String |
readString(long offset)
Reads a string from the buffer at the given offset.
|
int |
readUnsignedByte(long offset)
Reads an unsigned byte from the buffer at the given offset.
|
long |
readUnsignedInt(long offset)
Reads a 32-bit unsigned integer from the buffer at the given offset.
|
int |
readUnsignedMedium(long offset)
Reads a 24-bin unsigned integer from the buffer at the given offset.
|
int |
readUnsignedShort(long offset)
Reads a 16-bit unsigned integer from the buffer at the given offset.
|
String |
readUTF8(long offset)
Reads a UTF-8 string from the buffer at the given offset.
|
T read(long offset, Bytes dst, long dstOffset, long length)
offset - The offset from which to start reading bytes.dst - The byte array into which to read bytes.dstOffset - The offset at which to write bytes into the given buffer.length - The total number of bytes to read.T read(long offset, byte[] dst, long dstOffset, long length)
offset - The offset from which to start reading bytes.dst - The byte array into which to read bytes.dstOffset - The offset at which to write bytes into the given bufferlength - The total number of bytes to read.int readByte(long offset)
offset - The offset at which to read the byte.int readUnsignedByte(long offset)
offset - The offset at which to read the byte.char readChar(long offset)
offset - The offset at which to read the character.short readShort(long offset)
offset - The offset at which to read the short.int readUnsignedShort(long offset)
offset - The offset at which to read the short.int readMedium(long offset)
offset - The offset at which to read the integer.int readUnsignedMedium(long offset)
offset - The offset at which to read the integer.int readInt(long offset)
offset - The offset at which to read the integer.long readUnsignedInt(long offset)
offset - The offset at which to read the integer.long readLong(long offset)
offset - The offset at which to read the long.float readFloat(long offset)
offset - The offset at which to read the float.double readDouble(long offset)
offset - The offset at which to read the double.boolean readBoolean(long offset)
offset - The offset at which to read the boolean.String readString(long offset)
offset - The offset at which to read the string.String readUTF8(long offset)
offset - The offset at which to read the string.Copyright © 2013–2015. All rights reserved.