Package org.mariadb.jdbc.client
Class ReadableByteBuf
- java.lang.Object
-
- org.mariadb.jdbc.client.ReadableByteBuf
-
public final class ReadableByteBuf extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ReadableByteBuf(MutableInt sequence, byte[] buf, int limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
buf()
ReadableByteBuf
buf(byte[] buf, int limit)
byte
getByte()
byte
getByte(int index)
MutableInt
getSequence()
short
getUnsignedByte()
void
mark()
int
pos()
void
pos(int pos)
int
readableBytes()
java.lang.String
readAscii(int length)
MariaDbBlob
readBlob(int length)
byte
readByte()
ReadableByteBuf
readBytes(byte[] dst)
byte[]
readBytesNullEnd()
double
readDouble()
double
readDoubleBE()
float
readFloat()
int
readInt()
int
readIntBE()
java.lang.Integer
readLength()
ReadableByteBuf
readLengthBuffer()
int
readLengthNotNull()
long
readLong()
long
readLongBE()
int
readMedium()
short
readShort()
java.lang.String
readString(int length)
java.lang.String
readStringEof()
java.lang.String
readStringNullEnd()
short
readUnsignedByte()
long
readUnsignedInt()
int
readUnsignedMedium()
int
readUnsignedShort()
void
reset()
void
skip()
ReadableByteBuf
skip(int length)
int
skipIdentifier()
Identifier can have a max length of 256 (alias) So no need to check whole length encoding.
-
-
-
Field Detail
-
sequence
private final MutableInt sequence
-
limit
private int limit
-
buf
private byte[] buf
-
pos
private int pos
-
mark
private int mark
-
-
Constructor Detail
-
ReadableByteBuf
public ReadableByteBuf(MutableInt sequence, byte[] buf, int limit)
-
-
Method Detail
-
readableBytes
public int readableBytes()
-
pos
public int pos()
-
buf
public byte[] buf()
-
buf
public ReadableByteBuf buf(byte[] buf, int limit)
-
pos
public void pos(int pos)
-
mark
public void mark()
-
reset
public void reset()
-
skip
public void skip()
-
skip
public ReadableByteBuf skip(int length)
-
readBlob
public MariaDbBlob readBlob(int length)
-
getSequence
public MutableInt getSequence()
-
getByte
public byte getByte()
-
getByte
public byte getByte(int index)
-
getUnsignedByte
public short getUnsignedByte()
-
readLengthNotNull
public int readLengthNotNull()
-
skipIdentifier
public int skipIdentifier()
Identifier can have a max length of 256 (alias) So no need to check whole length encoding.- Returns:
- current pos
-
readLength
public java.lang.Integer readLength()
-
readByte
public byte readByte()
-
readUnsignedByte
public short readUnsignedByte()
-
readShort
public short readShort()
-
readUnsignedShort
public int readUnsignedShort()
-
readMedium
public int readMedium()
-
readUnsignedMedium
public int readUnsignedMedium()
-
readInt
public int readInt()
-
readIntBE
public int readIntBE()
-
readUnsignedInt
public long readUnsignedInt()
-
readLong
public long readLong()
-
readLongBE
public long readLongBE()
-
readBytes
public ReadableByteBuf readBytes(byte[] dst)
-
readBytesNullEnd
public byte[] readBytesNullEnd()
-
readLengthBuffer
public ReadableByteBuf readLengthBuffer()
-
readString
public java.lang.String readString(int length)
-
readAscii
public java.lang.String readAscii(int length)
-
readStringNullEnd
public java.lang.String readStringNullEnd()
-
readStringEof
public java.lang.String readStringEof()
-
readFloat
public float readFloat()
-
readDouble
public double readDouble()
-
readDoubleBE
public double readDoubleBE()
-
-