Package com.liferay.portal.kernel.io
Class Deserializer
Object
com.liferay.portal.kernel.io.Deserializer
Deserializes data in a ClassLoader-aware manner. This class is the
counterpart of
Serializer
for deserialization.- Author:
- Shuyang Zhou
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
detectBufferUnderflow
(int availableBytes) Detects a buffer underflow throwing anIllegalStateException
if the input data is shorter than the reserved space.boolean
byte
readByte()
char
readChar()
double
float
int
readInt()
long
readLong()
<T extends Serializable>
Tshort
-
Field Details
-
buffer
protected byte[] buffer -
index
protected int index -
limit
protected int limit
-
-
Constructor Details
-
Deserializer
-
-
Method Details
-
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
- Throws:
ClassNotFoundException
-
readShort
public short readShort() -
readString
-
detectBufferUnderflow
protected final void detectBufferUnderflow(int availableBytes) Detects a buffer underflow throwing anIllegalStateException
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
-