Class ObjectDecoderInputStream
java.lang.Object
java.io.InputStream
org.jboss.netty.handler.codec.serialization.ObjectDecoderInputStream
- All Implemented Interfaces:
Closeable
,DataInput
,ObjectInput
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassResolver
private final DataInputStream
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newObjectInput
.ObjectDecoderInputStream
(InputStream in, int maxObjectSize) Creates a newObjectInput
.ObjectDecoderInputStream
(InputStream in, ClassLoader classLoader) Creates a newObjectInput
.ObjectDecoderInputStream
(InputStream in, ClassLoader classLoader, int maxObjectSize) Creates a newObjectInput
. -
Method Summary
Modifier and TypeMethodDescriptionint
void
close()
void
mark
(int readlimit) boolean
int
read()
final int
read
(byte[] b) final int
read
(byte[] b, int off, int len) final boolean
final byte
readByte()
final char
readChar()
final double
final float
final void
readFully
(byte[] b) final void
readFully
(byte[] b, int off, int len) final int
readInt()
final String
readLine()
Deprecated.final long
readLong()
final short
final int
final int
final String
readUTF()
void
reset()
long
skip
(long n) final int
skipBytes
(int n)
-
Field Details
-
in
-
maxObjectSize
private final int maxObjectSize -
classResolver
-
-
Constructor Details
-
ObjectDecoderInputStream
Creates a newObjectInput
.- Parameters:
in
- theInputStream
where the serialized form will be read from
-
ObjectDecoderInputStream
Creates a newObjectInput
.- Parameters:
in
- theInputStream
where the serialized form will be read fromclassLoader
- theClassLoader
which will load the class of the serialized object
-
ObjectDecoderInputStream
Creates a newObjectInput
.- Parameters:
in
- theInputStream
where the serialized form will be read frommaxObjectSize
- the maximum byte length of the serialized object. if the length of the received object is greater than this value, aStreamCorruptedException
will be raised.
-
ObjectDecoderInputStream
Creates a newObjectInput
.- Parameters:
in
- theInputStream
where the serialized form will be read fromclassLoader
- theClassLoader
which will load the class of the serialized objectmaxObjectSize
- the maximum byte length of the serialized object. if the length of the received object is greater than this value, aStreamCorruptedException
will be raised.
-
-
Method Details
-
readObject
- Specified by:
readObject
in interfaceObjectInput
- Throws:
ClassNotFoundException
IOException
-
available
- Specified by:
available
in interfaceObjectInput
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectInput
- Overrides:
close
in classInputStream
- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
read
- Specified by:
read
in interfaceObjectInput
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in interfaceObjectInput
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readBoolean
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readChar
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readDouble
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readFloat
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readInt
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLine
Deprecated.- Specified by:
readLine
in interfaceDataInput
- Throws:
IOException
-
readLong
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readShort
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readUTF
- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
skip
- Specified by:
skip
in interfaceObjectInput
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
skipBytes
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-