Deprecated
This class has been deprecated with no replacement, because serialization can be a security liability
ByteBufs into Java
objects.
Please note that the serialized form this decoder expects is not
compatible with the standard ObjectOutputStream. Please use
ObjectEncoder or ObjectEncoderOutputStream to ensure the
interoperability with this decoder.
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.
| Modifier and Type | Field and Description |
|---|---|
| private final ClassResolver | classResolver
Deprecated
as a consequence of
ClassResolver being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public | ObjectDecoder(ClassResolver
the classResolver)ClassResolver to use for this decoder
Deprecated
as a consequence of
Creates a new decoder whose maximum object size is ClassResolver being deprecated.
1048576
bytes.
|
| public | ObjectDecoder(int
the maximum byte length of the serialized object.
if the length of the received object is greater
than this value, maxObjectSize, ClassResolver StreamCorruptedException
will be raised.the classResolver)ClassResolver which will load the class
of the serialized object
Deprecated
as a consequence of
Creates a new decoder with the specified maximum object size.
ClassResolver being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| protected Object | decode(ChannelHandlerContext
the ctx, ByteBuf ChannelHandlerContext which this ByteToMessageDecoder belongs tothe in)ByteBuf from which to read dataOverrides io. ByteBuf and return it.
|
| classResolver | back to summary |
|---|---|
| private final ClassResolver classResolver
Deprecated as a consequence of | |
| ObjectDecoder | back to summary |
|---|---|
| public ObjectDecoder(ClassResolver classResolver)
Deprecated as a consequence of Creates a new decoder whose maximum object size is
| |
| ObjectDecoder | back to summary |
|---|---|
| public ObjectDecoder(int maxObjectSize, ClassResolver classResolver)
Deprecated as a consequence of Creates a new decoder with the specified maximum object size.
| |
| decode | back to summary |
|---|---|
| protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception Overrides io. Doc from io. Create a frame out of the
| |