public class Deserializer extends Object
Serializer
for deserialization.Serializer
Modifier and Type | Class and Description |
---|---|
protected class |
Deserializer.BufferInputStream |
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
protected int |
index |
protected int |
limit |
Constructor and Description |
---|
Deserializer(ByteBuffer byteBuffer) |
Modifier and Type | Method and Description |
---|---|
protected void |
detectBufferUnderflow(int availableBytes)
Detects a buffer underflow throwing an
IllegalStateException if the input data is shorter than the
reserved space. |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
<T extends Serializable> |
readObject() |
short |
readShort() |
String |
readString() |
public Deserializer(ByteBuffer byteBuffer)
public boolean readBoolean()
public byte readByte()
public char readChar()
public double readDouble()
public float readFloat()
public int readInt()
public long readLong()
public <T extends Serializable> T readObject() throws ClassNotFoundException
ClassNotFoundException
public short readShort()
public String readString()
protected final void detectBufferUnderflow(int availableBytes)
IllegalStateException
if the input data is shorter than the
reserved space. This method is final so JIT can perform an inline
expansion.availableBytes
- number of bytes available in input buffer