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.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a newObjectOutputwith the estimated length of 512 bytes.ObjectEncoderOutputStream(OutputStream out, int estimatedLength) Deprecated.Creates a newObjectOutput. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.voidflush()Deprecated.final intsize()Deprecated.voidwrite(byte[] b) Deprecated.voidwrite(byte[] b, int off, int len) Deprecated.voidwrite(int b) Deprecated.final voidwriteBoolean(boolean v) Deprecated.final voidwriteByte(int v) Deprecated.final voidwriteBytes(String s) Deprecated.final voidwriteChar(int v) Deprecated.final voidwriteChars(String s) Deprecated.final voidwriteDouble(double v) Deprecated.final voidwriteFloat(float v) Deprecated.final voidwriteInt(int v) Deprecated.final voidwriteLong(long v) Deprecated.voidwriteObject(Object obj) Deprecated.final voidwriteShort(int v) Deprecated.final voidDeprecated.
-
Constructor Details
-
ObjectEncoderOutputStream
Deprecated.Creates a newObjectOutputwith the estimated length of 512 bytes.- Parameters:
out- theOutputStreamwhere the serialized form will be written out
-
ObjectEncoderOutputStream
Deprecated.Creates a newObjectOutput.- Parameters:
out- theOutputStreamwhere 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:
writeObjectin interfaceObjectOutput- Throws:
IOException
-
write
Deprecated.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Specified by:
writein classOutputStream- Throws:
IOException
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectOutput- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
Deprecated.- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceObjectOutput- Overrides:
flushin classOutputStream- Throws:
IOException
-
size
public final int size()Deprecated. -
write
Deprecated.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classOutputStream- Throws:
IOException
-
write
Deprecated.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classOutputStream- Throws:
IOException
-
writeBoolean
Deprecated.- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeByte
Deprecated.- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeBytes
Deprecated.- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChar
Deprecated.- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeChars
Deprecated.- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeDouble
Deprecated.- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeFloat
Deprecated.- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeInt
Deprecated.- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeLong
Deprecated.- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeShort
Deprecated.- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeUTF
Deprecated.- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-