public class NetworkData extends Object
| Constructor and Description |
|---|
NetworkData() |
NetworkData(byte[] data) |
NetworkData(int size) |
| Modifier and Type | Method and Description |
|---|---|
int |
bytesAvailable() |
byte[] |
getBytes()
Get the raw network order bytes
|
int |
getReaderIndex() |
int |
getWriterIndex() |
boolean |
isBytesAvailable() |
int |
length() |
void |
markReaderIndex() |
int |
readableBytes() |
byte[] |
readBytes() |
void |
readBytes(byte[] destination) |
byte[] |
readBytes(int len,
int max)
Read limited number of bytes into result (max param), but always return result with size of len
param.
|
short |
readUnsignedByte() |
char |
readUnsignedChar() |
long |
readUnsignedInt() |
void |
resetReaderIndex() |
void |
rewind(int bytes) |
void |
setReaderIndex(int index) |
int |
writableBytes() |
byte[] |
write() |
void |
writeByte(int b) |
void |
writeBytes(byte[] b) |
void |
writeChar(int c) |
void |
writeInt(long i) |
public NetworkData(int size)
public NetworkData()
public NetworkData(byte[] data)
public int length()
public int bytesAvailable()
public boolean isBytesAvailable()
public long readUnsignedInt()
public short readUnsignedByte()
public char readUnsignedChar()
public byte[] readBytes()
public void readBytes(byte[] destination)
public byte[] readBytes(int len,
int max)
len - the size of return byte[]max - the max number of bytes read from bufferpublic void writeChar(int c)
public void writeByte(int b)
public void writeBytes(byte[] b)
public void writeInt(long i)
public byte[] write()
public int readableBytes()
public int writableBytes()
public int getReaderIndex()
public void setReaderIndex(int index)
public int getWriterIndex()
public void markReaderIndex()
public void resetReaderIndex()
public void rewind(int bytes)
public byte[] getBytes()
Copyright © 2019. All rights reserved.