Class ObjectEncoderOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- io.netty.handler.codec.serialization.ObjectEncoderOutputStream
-
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,ObjectOutput,AutoCloseable
@Deprecated public class ObjectEncoderOutputStream extends OutputStream implements ObjectOutput
Deprecated.This class has been deprecated with no replacement, because serialization can be a security liabilityAnObjectOutputwhich is interoperable withObjectDecoderandObjectDecoderInputStream.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 ObjectEncoderOutputStream(OutputStream out)Deprecated.Creates a newObjectOutputwith the estimated length of 512 bytes.ObjectEncoderOutputStream(OutputStream out, int estimatedLength)Deprecated.Creates a newObjectOutput.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.voidflush()Deprecated.intsize()Deprecated.voidwrite(byte[] b)Deprecated.voidwrite(byte[] b, int off, int len)Deprecated.voidwrite(int b)Deprecated.voidwriteBoolean(boolean v)Deprecated.voidwriteByte(int v)Deprecated.voidwriteBytes(String s)Deprecated.voidwriteChar(int v)Deprecated.voidwriteChars(String s)Deprecated.voidwriteDouble(double v)Deprecated.voidwriteFloat(float v)Deprecated.voidwriteInt(int v)Deprecated.voidwriteLong(long v)Deprecated.voidwriteObject(Object obj)Deprecated.voidwriteShort(int v)Deprecated.voidwriteUTF(String str)Deprecated.-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
ObjectEncoderOutputStream
public ObjectEncoderOutputStream(OutputStream out)
Deprecated.Creates a newObjectOutputwith the estimated length of 512 bytes.- Parameters:
out- theOutputStreamwhere the serialized form will be written out
-
ObjectEncoderOutputStream
public ObjectEncoderOutputStream(OutputStream out, int estimatedLength)
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 Detail
-
writeObject
public void writeObject(Object obj) throws IOException
Deprecated.- Specified by:
writeObjectin interfaceObjectOutput- Throws:
IOException
-
write
public void write(int b) throws IOExceptionDeprecated.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Specified by:
writein classOutputStream- Throws:
IOException
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectOutput- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOExceptionDeprecated.- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceObjectOutput- Overrides:
flushin classOutputStream- Throws:
IOException
-
size
public final int size()
Deprecated.
-
write
public void write(byte[] b, int off, int len) throws IOExceptionDeprecated.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOExceptionDeprecated.- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classOutputStream- Throws:
IOException
-
writeBoolean
public final void writeBoolean(boolean v) throws IOExceptionDeprecated.- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeByte
public final void writeByte(int v) throws IOExceptionDeprecated.- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeBytes
public final void writeBytes(String s) throws IOException
Deprecated.- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChar
public final void writeChar(int v) throws IOExceptionDeprecated.- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeChars
public final void writeChars(String s) throws IOException
Deprecated.- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeDouble
public final void writeDouble(double v) throws IOExceptionDeprecated.- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeFloat
public final void writeFloat(float v) throws IOExceptionDeprecated.- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeInt
public final void writeInt(int v) throws IOExceptionDeprecated.- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeLong
public final void writeLong(long v) throws IOExceptionDeprecated.- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeShort
public final void writeShort(int v) throws IOExceptionDeprecated.- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeUTF
public final void writeUTF(String str) throws IOException
Deprecated.- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-
-