com.liferay.portal.kernel.io
Class Deserializer
java.lang.Object
com.liferay.portal.kernel.io.Deserializer
public class Deserializer
- extends java.lang.Object
Deserializes data in a ClassLoader-aware manner. This class is the
counterpart of Serializer for deserialization.
- Author:
- Shuyang Zhou
- See Also:
Serializer
|
Constructor Summary |
Deserializer(java.nio.ByteBuffer byteBuffer)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected byte[] buffer
index
protected int index
limit
protected int limit
Deserializer
public Deserializer(java.nio.ByteBuffer byteBuffer)
readBoolean
public boolean readBoolean()
readByte
public byte readByte()
readChar
public char readChar()
readDouble
public double readDouble()
readFloat
public float readFloat()
readInt
public int readInt()
readLong
public long readLong()
readObject
public <T extends java.io.Serializable> T readObject()
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
readShort
public short readShort()
readString
public java.lang.String readString()
detectBufferUnderflow
protected final void detectBufferUnderflow(int availableBytes)
- Detects a buffer underflow throwing an
IllegalStateException if the input data is shorter than the
reserved space. This method is final so JIT can perform an inline
expansion.
- Parameters:
availableBytes - number of bytes available in input buffer