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(int offset,
byte[] dst,
int dstOffset,
int length)
Reads bytes into the given byte array starting at the given offset up to the given length.
|
T |
read(int offset,
Bytes dst,
int dstOffset,
int length)
Reads bytes into the given byte array starting at the given offset up to the given length.
|
boolean |
readBoolean(int offset)
Reads a 1 byte boolean from the buffer at the given offset.
|
int |
readByte(int offset)
Reads a byte from the buffer at the given offset.
|
char |
readChar(int offset)
Reads a 16-bit character from the buffer at the given offset.
|
double |
readDouble(int offset)
Reads a double-precision 64-bit floating point number from the buffer at the given offset.
|
float |
readFloat(int offset)
Reads a single-precision 32-bit floating point number from the buffer at the given offset.
|
int |
readInt(int offset)
Reads a 32-bit signed integer from the buffer at the given offset.
|
long |
readLong(int offset)
Reads a 64-bit signed integer from the buffer at the given offset.
|
int |
readMedium(int offset)
Reads a 24-bit signed integer from the buffer at the given offset.
|
short |
readShort(int offset)
Reads a 16-bit signed integer from the buffer at the given offset.
|
String |
readString(int offset)
Reads a string from the buffer at the given offset.
|
String |
readString(int offset,
Charset charset)
Reads a string from the buffer at the given offset.
|
int |
readUnsignedByte(int offset)
Reads an unsigned byte from the buffer at the given offset.
|
long |
readUnsignedInt(int offset)
Reads a 32-bit unsigned integer from the buffer at the given offset.
|
int |
readUnsignedMedium(int offset)
Reads a 24-bin unsigned integer from the buffer at the given offset.
|
int |
readUnsignedShort(int offset)
Reads a 16-bit unsigned integer from the buffer at the given offset.
|
String |
readUTF8(int offset)
Reads a UTF-8 string from the buffer at the given offset.
|
T read(int offset, Bytes dst, int dstOffset, int 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(int offset, byte[] dst, int dstOffset, int 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(int offset)
offset - The offset at which to read the byte.int readUnsignedByte(int offset)
offset - The offset at which to read the byte.char readChar(int offset)
offset - The offset at which to read the character.short readShort(int offset)
offset - The offset at which to read the short.int readUnsignedShort(int offset)
offset - The offset at which to read the short.int readMedium(int offset)
offset - The offset at which to read the integer.int readUnsignedMedium(int offset)
offset - The offset at which to read the integer.int readInt(int offset)
offset - The offset at which to read the integer.long readUnsignedInt(int offset)
offset - The offset at which to read the integer.long readLong(int offset)
offset - The offset at which to read the long.float readFloat(int offset)
offset - The offset at which to read the float.double readDouble(int offset)
offset - The offset at which to read the double.boolean readBoolean(int offset)
offset - The offset at which to read the boolean.String readString(int offset)
offset - The offset at which to read the string.String readString(int offset, Charset charset)
offset - The offset at which to read the string.charset - The character set with which to decode the string.String readUTF8(int offset)
offset - The offset at which to read the string.Copyright © 2013–2017. All rights reserved.