public class Reader extends Object
Modifier and Type | Method and Description |
---|---|
void |
appendPacket(RawPacket rawPacket) |
byte |
getByteAt(int i) |
long |
getLengthEncodedBinary() |
byte[] |
getLengthEncodedBytes() |
byte[] |
getLengthEncodedBytesWithLength(long length) |
String |
getLengthEncodedString() |
byte |
getPacketSeq() |
int |
getRemainingSize() |
long |
getSilentLengthEncodedBinary() |
int |
read24bitword() |
byte |
readByte()
reads a byte from the buffer
|
int |
readInt()
read a int (4 bytes) from the buffer;
|
long |
readLong()
read a long (8 bytes) from the buffer;
|
byte[] |
readRawBytes(int numberOfBytes) |
short |
readShort()
read a short (2 bytes) from the buffer;
|
String |
readString(String charset)
Reads a string from the buffer, looks for a 0 to end the string
|
void |
skipByte() |
long |
skipBytes(int bytesToSkip) |
Reader |
skipLengthEncodedBytes() |
public Reader(RawPacket rawPacket)
public String readString(String charset)
charset
- the charset to use, for example ASCIIpublic short readShort()
public int readInt()
public long readLong()
public byte readByte()
public byte[] readRawBytes(int numberOfBytes)
public void skipByte() throws IOException
IOException
public long skipBytes(int bytesToSkip)
public Reader skipLengthEncodedBytes()
public int read24bitword()
public long getLengthEncodedBinary()
public String getLengthEncodedString()
public byte[] getLengthEncodedBytes() throws IOException
IOException
public byte[] getLengthEncodedBytesWithLength(long length)
public byte getByteAt(int i) throws IOException
IOException
public byte getPacketSeq()
public int getRemainingSize()
public void appendPacket(RawPacket rawPacket)
public long getSilentLengthEncodedBinary()
Copyright © 2015. All rights reserved.