Class ObjectDecoderInputStream
- java.lang.Object
-
- java.io.InputStream
-
- io.netty.handler.codec.serialization.ObjectDecoderInputStream
-
- All Implemented Interfaces:
Closeable,DataInput,ObjectInput,AutoCloseable
@Deprecated public class ObjectDecoderInputStream extends InputStream implements ObjectInput
Deprecated.This class has been deprecated with no replacement, because serialization can be a security liabilityAnObjectInputwhich is interoperable withObjectEncoderandObjectEncoderOutputStream.Security: serialization can be a security liability, and should not be used without defining a list of classes that are allowed to be desirialized. Such a list can be specified with the jdk.serialFilter system property, for instance. See the serialization filtering article for more information.
-
-
Constructor Summary
Constructors Constructor Description ObjectDecoderInputStream(InputStream in)Deprecated.Creates a newObjectInput.ObjectDecoderInputStream(InputStream in, int maxObjectSize)Deprecated.Creates a newObjectInput.ObjectDecoderInputStream(InputStream in, ClassLoader classLoader)Deprecated.Creates a newObjectInput.ObjectDecoderInputStream(InputStream in, ClassLoader classLoader, int maxObjectSize)Deprecated.Creates a newObjectInput.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intavailable()Deprecated.voidclose()Deprecated.voidmark(int readlimit)Deprecated.booleanmarkSupported()Deprecated.intread()Deprecated.intread(byte[] b)Deprecated.intread(byte[] b, int off, int len)Deprecated.booleanreadBoolean()Deprecated.bytereadByte()Deprecated.charreadChar()Deprecated.doublereadDouble()Deprecated.floatreadFloat()Deprecated.voidreadFully(byte[] b)Deprecated.voidreadFully(byte[] b, int off, int len)Deprecated.intreadInt()Deprecated.StringreadLine()Deprecated.UseBufferedReader.readLine()instead.longreadLong()Deprecated.ObjectreadObject()Deprecated.shortreadShort()Deprecated.intreadUnsignedByte()Deprecated.intreadUnsignedShort()Deprecated.StringreadUTF()Deprecated.voidreset()Deprecated.longskip(long n)Deprecated.intskipBytes(int n)Deprecated.-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ObjectDecoderInputStream
public ObjectDecoderInputStream(InputStream in)
Deprecated.Creates a newObjectInput.- Parameters:
in- theInputStreamwhere the serialized form will be read from
-
ObjectDecoderInputStream
public ObjectDecoderInputStream(InputStream in, ClassLoader classLoader)
Deprecated.Creates a newObjectInput.- Parameters:
in- theInputStreamwhere the serialized form will be read fromclassLoader- theClassLoaderwhich will load the class of the serialized object
-
ObjectDecoderInputStream
public ObjectDecoderInputStream(InputStream in, int maxObjectSize)
Deprecated.Creates a newObjectInput.- Parameters:
in- theInputStreamwhere 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, aStreamCorruptedExceptionwill be raised.
-
ObjectDecoderInputStream
public ObjectDecoderInputStream(InputStream in, ClassLoader classLoader, int maxObjectSize)
Deprecated.Creates a newObjectInput.- Parameters:
in- theInputStreamwhere the serialized form will be read fromclassLoader- theClassLoaderwhich 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, aStreamCorruptedExceptionwill be raised.
-
-
Method Detail
-
readObject
public Object readObject() throws ClassNotFoundException, IOException
Deprecated.- Specified by:
readObjectin interfaceObjectInput- Throws:
ClassNotFoundExceptionIOException
-
available
public int available() throws IOExceptionDeprecated.- Specified by:
availablein interfaceObjectInput- Overrides:
availablein classInputStream- Throws:
IOException
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectInput- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
Deprecated.- Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()
Deprecated.- Overrides:
markSupportedin classInputStream
-
read
public int read() throws IOExceptionDeprecated.- Specified by:
readin interfaceObjectInput- Specified by:
readin classInputStream- Throws:
IOException
-
read
public final int read(byte[] b, int off, int len) throws IOExceptionDeprecated.- Specified by:
readin interfaceObjectInput- Overrides:
readin classInputStream- Throws:
IOException
-
read
public final int read(byte[] b) throws IOExceptionDeprecated.- Specified by:
readin interfaceObjectInput- Overrides:
readin classInputStream- Throws:
IOException
-
readBoolean
public final boolean readBoolean() throws IOExceptionDeprecated.- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
public final byte readByte() throws IOExceptionDeprecated.- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readChar
public final char readChar() throws IOExceptionDeprecated.- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readDouble
public final double readDouble() throws IOExceptionDeprecated.- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readFloat
public final float readFloat() throws IOExceptionDeprecated.- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readFully
public final void readFully(byte[] b, int off, int len) throws IOExceptionDeprecated.- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
public final void readFully(byte[] b) throws IOExceptionDeprecated.- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readInt
public final int readInt() throws IOExceptionDeprecated.- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLine
@Deprecated public final String readLine() throws IOException
Deprecated.UseBufferedReader.readLine()instead.- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readLong
public final long readLong() throws IOExceptionDeprecated.- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readShort
public final short readShort() throws IOExceptionDeprecated.- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedByte
public final int readUnsignedByte() throws IOExceptionDeprecated.- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readUnsignedShort
public final int readUnsignedShort() throws IOExceptionDeprecated.- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readUTF
public final String readUTF() throws IOException
Deprecated.- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
reset
public void reset() throws IOExceptionDeprecated.- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOExceptionDeprecated.- Specified by:
skipin interfaceObjectInput- Overrides:
skipin classInputStream- Throws:
IOException
-
skipBytes
public final int skipBytes(int n) throws IOExceptionDeprecated.- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
-