Class ObjectEncoderOutputStream
java.lang.Object
java.io.OutputStream
io.netty.handler.codec.serialization.ObjectEncoderOutputStream
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,ObjectOutput
,AutoCloseable
Deprecated.
This class has been deprecated with no replacement,
because serialization can be a security liability
An
ObjectOutput
which is interoperable with ObjectDecoder
and ObjectDecoderInputStream
.
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Deprecated.private final DataOutputStream
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a newObjectOutput
with the estimated length of 512 bytes.ObjectEncoderOutputStream
(OutputStream out, int estimatedLength) Deprecated.Creates a newObjectOutput
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated.void
flush()
Deprecated.final int
size()
Deprecated.void
write
(byte[] b) Deprecated.void
write
(byte[] b, int off, int len) Deprecated.void
write
(int b) Deprecated.final void
writeBoolean
(boolean v) Deprecated.final void
writeByte
(int v) Deprecated.final void
writeBytes
(String s) Deprecated.final void
writeChar
(int v) Deprecated.final void
writeChars
(String s) Deprecated.final void
writeDouble
(double v) Deprecated.final void
writeFloat
(float v) Deprecated.final void
writeInt
(int v) Deprecated.final void
writeLong
(long v) Deprecated.void
writeObject
(Object obj) Deprecated.final void
writeShort
(int v) Deprecated.final void
Deprecated.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
out
Deprecated. -
estimatedLength
private final int estimatedLengthDeprecated.
-
-
Constructor Details
-
ObjectEncoderOutputStream
Deprecated.Creates a newObjectOutput
with the estimated length of 512 bytes.- Parameters:
out
- theOutputStream
where the serialized form will be written out
-
ObjectEncoderOutputStream
Deprecated.Creates a newObjectOutput
.- Parameters:
out
- theOutputStream
where the serialized form will be written outestimatedLength
- the estimated byte length of the serialized form of an object. If the length of the serialized form exceeds this value, the internal buffer will be expanded automatically at the cost of memory bandwidth. If this value is too big, it will also waste memory bandwidth. To avoid unnecessary memory copy or allocation cost, please specify the properly estimated value.
-
-
Method Details
-
writeObject
Deprecated.- Specified by:
writeObject
in interfaceObjectOutput
- Throws:
IOException
-
write
Deprecated.- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
close
Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectOutput
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
Deprecated.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceObjectOutput
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
size
public final int size()Deprecated. -
write
Deprecated.- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
Deprecated.- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeBoolean
Deprecated.- Specified by:
writeBoolean
in interfaceDataOutput
- Throws:
IOException
-
writeByte
Deprecated.- Specified by:
writeByte
in interfaceDataOutput
- Throws:
IOException
-
writeBytes
Deprecated.- Specified by:
writeBytes
in interfaceDataOutput
- Throws:
IOException
-
writeChar
Deprecated.- Specified by:
writeChar
in interfaceDataOutput
- Throws:
IOException
-
writeChars
Deprecated.- Specified by:
writeChars
in interfaceDataOutput
- Throws:
IOException
-
writeDouble
Deprecated.- Specified by:
writeDouble
in interfaceDataOutput
- Throws:
IOException
-
writeFloat
Deprecated.- Specified by:
writeFloat
in interfaceDataOutput
- Throws:
IOException
-
writeInt
Deprecated.- Specified by:
writeInt
in interfaceDataOutput
- Throws:
IOException
-
writeLong
Deprecated.- Specified by:
writeLong
in interfaceDataOutput
- Throws:
IOException
-
writeShort
Deprecated.- Specified by:
writeShort
in interfaceDataOutput
- Throws:
IOException
-
writeUTF
Deprecated.- Specified by:
writeUTF
in interfaceDataOutput
- Throws:
IOException
-