public final class StandardReadableByteBuf extends Object implements com.singlestore.jdbc.client.ReadableByteBuf
| Constructor and Description |
|---|
StandardReadableByteBuf(byte[] buf)
Packet buffer constructor, limit being the buffer length
|
StandardReadableByteBuf(byte[] buf,
int limit) |
| Modifier and Type | Method and Description |
|---|---|
long |
atoll(int length)
Fast signed long parsing
|
long |
atoull(int length)
Fast unsigned long parsing
|
byte[] |
buf()
buffer
|
void |
buf(byte[] buf,
int limit,
int pos)
Reset buffer
|
byte |
getByte()
Read byte from buffer at current position, without changing position
|
byte |
getByte(int index)
Read byte from buffer at indicated index, without changing position
|
short |
getUnsignedByte()
Read unsigned byte value at current position, without changing position
|
int |
pos()
Current buffer position
|
void |
pos(int pos)
Set position
|
int |
readableBytes()
buffer number of unread bytes
|
String |
readAscii(int length)
Read ascii encoded string from length bytes
|
SingleStoreBlob |
readBlob(int length)
Read Blob at current position
|
byte |
readByte()
Read byte at current position, incrementing position
|
void |
readBytes(byte[] dst)
Read as many bytes to fill destination array
|
byte[] |
readBytesNullEnd()
Read null-ended encoded bytes.
|
double |
readDouble()
Read double encoded on 8 bytes value at current position
|
double |
readDoubleBE()
Read double encoded on 8 bytes (big endian) value at current position
|
float |
readFloat()
Read float encoded on 4 bytes value at current position
|
int |
readInt()
Read signed 4 bytes value (little endian) at current position
|
int |
readIntBE()
Read signed 4 bytes value (big endian) at current position
|
int |
readIntLengthEncodedNotNull()
Read encoded length value that cannot be null see
|
Integer |
readLength() |
StandardReadableByteBuf |
readLengthBuffer()
Return a length encoded buffer
|
long |
readLong()
Read signed 8 bytes value (little endian) at current position
|
long |
readLongBE()
Read unsigned 4 bytes value (big endian) at current position
|
long |
readLongLengthEncodedNotNull()
Read encoded length value that cannot be null see
|
int |
readMedium()
Read signed 3 bytes value (little endian) at current position
|
short |
readShort()
Read signed 2 bytes value (little endian) at current position
|
String |
readString(int length)
Read utf-8 encoded string from length bytes
|
String |
readStringEof()
Return the utf-8 string represented by current position to the limit of buffer
|
String |
readStringNullEnd()
Read null-ended utf-8 encoded string.
|
short |
readUnsignedByte()
Read unsigned byte value at current position
|
long |
readUnsignedInt()
Read unsigned 4 bytes value (little endian) at current position
|
int |
readUnsignedMedium()
Read unsigned 3 bytes value (little endian) at current position
|
int |
readUnsignedShort()
Read unsigned 2 bytes value (little endian) at current position
|
void |
skip()
Skip one byte
|
void |
skip(int length)
Skip length value of bytes
|
int |
skipIdentifier()
Identifier can have a max length of 256 (alias) So no need to check whole length encoding.
|
void |
skipLengthEncoded()
Skip length encoded value
|
public StandardReadableByteBuf(byte[] buf,
int limit)
public StandardReadableByteBuf(byte[] buf)
buf - bufferpublic int readableBytes()
com.singlestore.jdbc.client.ReadableByteBufreadableBytes in interface com.singlestore.jdbc.client.ReadableByteBufpublic int pos()
com.singlestore.jdbc.client.ReadableByteBufpos in interface com.singlestore.jdbc.client.ReadableByteBufpublic byte[] buf()
com.singlestore.jdbc.client.ReadableByteBufbuf in interface com.singlestore.jdbc.client.ReadableByteBufpublic void buf(byte[] buf,
int limit,
int pos)
com.singlestore.jdbc.client.ReadableByteBufbuf in interface com.singlestore.jdbc.client.ReadableByteBufbuf - new bufferlimit - buffer limitpos - initial positionpublic void pos(int pos)
com.singlestore.jdbc.client.ReadableByteBufpos in interface com.singlestore.jdbc.client.ReadableByteBufpos - new positionpublic void skip()
com.singlestore.jdbc.client.ReadableByteBufskip in interface com.singlestore.jdbc.client.ReadableByteBufpublic void skip(int length)
com.singlestore.jdbc.client.ReadableByteBufskip in interface com.singlestore.jdbc.client.ReadableByteBuflength - number of position to skippublic void skipLengthEncoded()
com.singlestore.jdbc.client.ReadableByteBufskipLengthEncoded in interface com.singlestore.jdbc.client.ReadableByteBufpublic SingleStoreBlob readBlob(int length)
com.singlestore.jdbc.client.ReadableByteBufreadBlob in interface com.singlestore.jdbc.client.ReadableByteBuflength - blob lengthpublic long atoll(int length)
com.singlestore.jdbc.client.ReadableByteBufatoll in interface com.singlestore.jdbc.client.ReadableByteBuflength - data lengthpublic long atoull(int length)
com.singlestore.jdbc.client.ReadableByteBufatoull in interface com.singlestore.jdbc.client.ReadableByteBuflength - data lengthpublic byte getByte()
com.singlestore.jdbc.client.ReadableByteBufgetByte in interface com.singlestore.jdbc.client.ReadableByteBufpublic byte getByte(int index)
com.singlestore.jdbc.client.ReadableByteBufgetByte in interface com.singlestore.jdbc.client.ReadableByteBufindex - indexpublic short getUnsignedByte()
com.singlestore.jdbc.client.ReadableByteBufgetUnsignedByte in interface com.singlestore.jdbc.client.ReadableByteBufpublic long readLongLengthEncodedNotNull()
com.singlestore.jdbc.client.ReadableByteBufreadLongLengthEncodedNotNull in interface com.singlestore.jdbc.client.ReadableByteBufpublic int readIntLengthEncodedNotNull()
com.singlestore.jdbc.client.ReadableByteBufthis is readLongLengthEncodedNotNull limited to 32 bits
readIntLengthEncodedNotNull in interface com.singlestore.jdbc.client.ReadableByteBufpublic int skipIdentifier()
skipIdentifier in interface com.singlestore.jdbc.client.ReadableByteBufpublic Integer readLength()
readLength in interface com.singlestore.jdbc.client.ReadableByteBufpublic byte readByte()
com.singlestore.jdbc.client.ReadableByteBufreadByte in interface com.singlestore.jdbc.client.ReadableByteBufpublic short readUnsignedByte()
com.singlestore.jdbc.client.ReadableByteBufreadUnsignedByte in interface com.singlestore.jdbc.client.ReadableByteBufpublic short readShort()
com.singlestore.jdbc.client.ReadableByteBufreadShort in interface com.singlestore.jdbc.client.ReadableByteBufpublic int readUnsignedShort()
com.singlestore.jdbc.client.ReadableByteBufreadUnsignedShort in interface com.singlestore.jdbc.client.ReadableByteBufpublic int readMedium()
com.singlestore.jdbc.client.ReadableByteBufreadMedium in interface com.singlestore.jdbc.client.ReadableByteBufpublic int readUnsignedMedium()
com.singlestore.jdbc.client.ReadableByteBufreadUnsignedMedium in interface com.singlestore.jdbc.client.ReadableByteBufpublic int readInt()
com.singlestore.jdbc.client.ReadableByteBufreadInt in interface com.singlestore.jdbc.client.ReadableByteBufpublic int readIntBE()
com.singlestore.jdbc.client.ReadableByteBufreadIntBE in interface com.singlestore.jdbc.client.ReadableByteBufpublic long readUnsignedInt()
com.singlestore.jdbc.client.ReadableByteBufreadUnsignedInt in interface com.singlestore.jdbc.client.ReadableByteBufpublic long readLong()
com.singlestore.jdbc.client.ReadableByteBufreadLong in interface com.singlestore.jdbc.client.ReadableByteBufpublic long readLongBE()
com.singlestore.jdbc.client.ReadableByteBufreadLongBE in interface com.singlestore.jdbc.client.ReadableByteBufpublic void readBytes(byte[] dst)
com.singlestore.jdbc.client.ReadableByteBufreadBytes in interface com.singlestore.jdbc.client.ReadableByteBufdst - destination arraypublic byte[] readBytesNullEnd()
com.singlestore.jdbc.client.ReadableByteBufreadBytesNullEnd in interface com.singlestore.jdbc.client.ReadableByteBufpublic StandardReadableByteBuf readLengthBuffer()
com.singlestore.jdbc.client.ReadableByteBufreadLengthBuffer in interface com.singlestore.jdbc.client.ReadableByteBufpublic String readString(int length)
com.singlestore.jdbc.client.ReadableByteBufreadString in interface com.singlestore.jdbc.client.ReadableByteBuflength - length byte to readpublic String readAscii(int length)
com.singlestore.jdbc.client.ReadableByteBufreadAscii in interface com.singlestore.jdbc.client.ReadableByteBuflength - length byte to readpublic String readStringNullEnd()
com.singlestore.jdbc.client.ReadableByteBufreadStringNullEnd in interface com.singlestore.jdbc.client.ReadableByteBufpublic String readStringEof()
com.singlestore.jdbc.client.ReadableByteBufreadStringEof in interface com.singlestore.jdbc.client.ReadableByteBufpublic float readFloat()
com.singlestore.jdbc.client.ReadableByteBufreadFloat in interface com.singlestore.jdbc.client.ReadableByteBufpublic double readDouble()
com.singlestore.jdbc.client.ReadableByteBufreadDouble in interface com.singlestore.jdbc.client.ReadableByteBufpublic double readDoubleBE()
com.singlestore.jdbc.client.ReadableByteBufreadDoubleBE in interface com.singlestore.jdbc.client.ReadableByteBufCopyright © 2025 SingleStore. All rights reserved.