Package io.dingodb.sdk.common.serial
Class BufImpl
java.lang.Object
io.dingodb.sdk.common.serial.BufImpl
- All Implemented Interfaces:
Buf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidensureRemainder(int length) byte[]getBytes()booleanisEnd()bytepeek()intpeekInt()longpeekLong()byteread()voidread(byte[] b, int pos, int length) byte[]read(int length) bytereadAt(int pos) voidreadAt(int srcPos, byte[] b, int pos, int length) byte[]readAt(int pos, int length) intreadInt()intreadIntAt(int pos) longreadLong()longreadLongAt(int pos) intshortshortreadShortAt(int pos) voidresize(int oldSize, int newSize) intbyteintvoidreverseSkip(int length) voidvoidreverseWrite(byte b) voidreverseWriteInt(int i) voidvoidsetForwardOffset(int pos) voidskip(int length) voidwrite(byte b) voidwrite(byte[] b) voidwrite(byte[] b, int pos, int length) voidwrite(int pos, byte b) voidwrite(int pos, byte[] b) voidwrite(int srcPos, byte[] b, int pos, int length) voidwriteInt(int i) voidwriteInt(int pos, int i) voidwriteLong(int pos, long l) voidwriteLong(long l) voidwriteShort(int pos, short i)
-
Constructor Details
-
BufImpl
public BufImpl(int bufSize) -
BufImpl
public BufImpl(byte[] keyBuf) -
BufImpl
public BufImpl(int bufSize, int dataPos)
-
-
Method Details
-
write
public void write(byte b) -
write
public void write(int pos, byte b) -
write
public void write(byte[] b) -
write
public void write(int pos, byte[] b) -
write
public void write(byte[] b, int pos, int length) -
write
public void write(int srcPos, byte[] b, int pos, int length) -
writeShort
public void writeShort(int pos, short i) - Specified by:
writeShortin interfaceBuf
-
writeInt
public void writeInt(int i) -
writeInt
public void writeInt(int pos, int i) -
writeLong
public void writeLong(long l) -
writeLong
public void writeLong(int pos, long l) -
peek
public byte peek() -
peekInt
public int peekInt() -
peekLong
public long peekLong() -
read
public byte read() -
readAt
public byte readAt(int pos) -
read
public byte[] read(int length) -
readAt
public byte[] readAt(int pos, int length) -
read
public void read(byte[] b, int pos, int length) -
readAt
public void readAt(int srcPos, byte[] b, int pos, int length) -
readShortAt
public short readShortAt(int pos) - Specified by:
readShortAtin interfaceBuf
-
readShort
public short readShort() -
readInt
public int readInt() -
readIntAt
public int readIntAt(int pos) -
readLong
public long readLong() -
readLongAt
public long readLongAt(int pos) - Specified by:
readLongAtin interfaceBuf
-
reverseWrite
public void reverseWrite(byte b) - Specified by:
reverseWritein interfaceBuf
-
reverseRead
public byte reverseRead()- Specified by:
reverseReadin interfaceBuf
-
reverseWriteInt
public void reverseWriteInt(int i) - Specified by:
reverseWriteIntin interfaceBuf
-
reverseWriteInt0
public void reverseWriteInt0()- Specified by:
reverseWriteInt0in interfaceBuf
-
reverseReadInt
public int reverseReadInt()- Specified by:
reverseReadIntin interfaceBuf
-
skip
public void skip(int length) -
reverseSkip
public void reverseSkip(int length) - Specified by:
reverseSkipin interfaceBuf
-
reverseSkipInt
public void reverseSkipInt()- Specified by:
reverseSkipIntin interfaceBuf
-
ensureRemainder
public void ensureRemainder(int length) - Specified by:
ensureRemainderin interfaceBuf
-
resize
public void resize(int oldSize, int newSize) -
setForwardOffset
public void setForwardOffset(int pos) - Specified by:
setForwardOffsetin interfaceBuf
-
isEnd
public boolean isEnd() -
restReadableSize
public int restReadableSize()- Specified by:
restReadableSizein interfaceBuf
-
readOffset
public int readOffset()- Specified by:
readOffsetin interfaceBuf
-
getBytes
public byte[] getBytes()
-