public interface MessageBuffer
| Modifier and Type | Method and Description |
|---|---|
boolean |
decodeHead(ByteBuffer headBuffer) |
void |
flip() |
int |
getCmd() |
short |
getMagic() |
ByteBuffer[] |
getPackets() |
int |
getPacketsCount() |
int |
getSeq() |
int |
getSubCmd() |
short |
getVersion() |
boolean |
hasRemaining() |
int |
limit() |
void |
packet(TCapdirCSPkg pkg,
int pkgVersion)
分包TCapdirCSPkg消息对象
|
void |
packet(TCaplusPkg pkg,
int pkgVersion) |
void |
packet(TCaplusPkg pkg,
int pkgVersion,
byte[] packetBuf)
分包TCaplusPkg消息对象
|
int |
position() |
void |
position(int position) |
void |
reset() |
void |
resize(byte[] buf)
使用外部buffer作为消息buffer
|
void |
resize(int size)
重新分配消息buffer空间大小
|
void |
setCmd(int cmd) |
void |
setMagic(short magic) |
void |
setSeq(int seq) |
void |
setSubCmd(int subCmd) |
void |
setVersion(short version) |
void |
unpack(TCapdirCSPkg pkg) |
void |
unpack(TCaplusPkg pkg) |
void resize(int size)
void resize(byte[] buf)
void packet(TCaplusPkg pkg, int pkgVersion, byte[] packetBuf) throws TdrException
TdrExceptionvoid packet(TCaplusPkg pkg, int pkgVersion) throws TdrException
TdrExceptionvoid packet(TCapdirCSPkg pkg, int pkgVersion) throws TdrException
TdrExceptionvoid unpack(TCaplusPkg pkg) throws TdrException
TdrExceptionvoid unpack(TCapdirCSPkg pkg) throws TdrException
TdrExceptionByteBuffer[] getPackets()
int getPacketsCount()
int limit()
int position()
void position(int position)
boolean hasRemaining()
void flip()
void setMagic(short magic)
short getMagic()
void setCmd(int cmd)
int getCmd()
int getSubCmd()
void setSubCmd(int subCmd)
void setVersion(short version)
short getVersion()
void setSeq(int seq)
int getSeq()
boolean decodeHead(ByteBuffer headBuffer)
void reset()
Copyright © 2026. All rights reserved.