Class ObjectSerializationInputStream
java.lang.Object
java.io.InputStream
org.apache.mina.filter.codec.serialization.ObjectSerializationInputStream
- All Implemented Interfaces:
Closeable, DataInput, ObjectInput, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassLoaderprivate final DataInputStreamprivate int -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance of an ObjectSerializationInputStreamObjectSerializationInputStream(InputStream in, ClassLoader classLoader) Create a new instance of an ObjectSerializationInputStream -
Method Summary
Modifier and TypeMethodDescriptionintintread()booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()Deprecated.Bytes are not properly converted to charslongreadLong()shortintintreadUTF()voidsetMaxObjectSize(int maxObjectSize) Sets the allowed maximum size of the object to be decoded.intskipBytes(int n) Methods inherited from class InputStream
available, close, mark, markSupported, read, read, reset, skip
-
Field Details
-
in
-
classLoader
-
maxObjectSize
private int maxObjectSize
-
-
Constructor Details
-
ObjectSerializationInputStream
Create a new instance of an ObjectSerializationInputStream- Parameters:
in- TheInputStreamto use
-
ObjectSerializationInputStream
Create a new instance of an ObjectSerializationInputStream- Parameters:
in- TheInputStreamto useclassLoader- The class loader to use
-
-
Method Details
-
getMaxObjectSize
public int getMaxObjectSize()- Returns:
- the allowed maximum size of the object to be decoded.
If the size of the object to be decoded exceeds this value, this
decoder will throw a
BufferDataException. The default value is1048576(1MB).
-
setMaxObjectSize
public void setMaxObjectSize(int maxObjectSize) Sets the allowed maximum size of the object to be decoded. If the size of the object to be decoded exceeds this value, this decoder will throw aBufferDataException. The default value is1048576(1MB).- Parameters:
maxObjectSize- The maximum decoded object size
-
read
- Specified by:
readin interfaceObjectInput- Specified by:
readin classInputStream- Throws:
IOException
-
readObject
- Specified by:
readObjectin interfaceObjectInput- Throws:
ClassNotFoundExceptionIOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLine
Deprecated.Bytes are not properly converted to chars- Specified by:
readLinein interfaceDataInput- Throws:
IOException- See Also:
-
readLong
- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-