@Deprecated
public class ObjectEncoderOutputStream
extends java.io.OutputStream
implements java.io.ObjectOutput
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.
| 构造器和说明 |
|---|
ObjectEncoderOutputStream(java.io.OutputStream out)
已过时。
Creates a new
ObjectOutput with the estimated length of 512
bytes. |
ObjectEncoderOutputStream(java.io.OutputStream out,
int estimatedLength)
已过时。
Creates a new
ObjectOutput. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
已过时。
|
void |
flush()
已过时。
|
int |
size()
已过时。
|
void |
write(byte[] b)
已过时。
|
void |
write(byte[] b,
int off,
int len)
已过时。
|
void |
write(int b)
已过时。
|
void |
writeBoolean(boolean v)
已过时。
|
void |
writeByte(int v)
已过时。
|
void |
writeBytes(java.lang.String s)
已过时。
|
void |
writeChar(int v)
已过时。
|
void |
writeChars(java.lang.String s)
已过时。
|
void |
writeDouble(double v)
已过时。
|
void |
writeFloat(float v)
已过时。
|
void |
writeInt(int v)
已过时。
|
void |
writeLong(long v)
已过时。
|
void |
writeObject(java.lang.Object obj)
已过时。
|
void |
writeShort(int v)
已过时。
|
void |
writeUTF(java.lang.String str)
已过时。
|
public ObjectEncoderOutputStream(java.io.OutputStream out)
ObjectOutput with the estimated length of 512
bytes.out - the OutputStream where the serialized form will be
written outpublic ObjectEncoderOutputStream(java.io.OutputStream out,
int estimatedLength)
ObjectOutput.out - the OutputStream 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.public void writeObject(java.lang.Object obj)
throws java.io.IOException
writeObject 在接口中 java.io.ObjectOutputjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write 在接口中 java.io.DataOutputwrite 在接口中 java.io.ObjectOutputwrite 在类中 java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close 在接口中 java.io.Closeableclose 在接口中 java.io.ObjectOutputclose 在接口中 java.lang.AutoCloseableclose 在类中 java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush 在接口中 java.io.Flushableflush 在接口中 java.io.ObjectOutputflush 在类中 java.io.OutputStreamjava.io.IOExceptionpublic final int size()
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write 在接口中 java.io.DataOutputwrite 在接口中 java.io.ObjectOutputwrite 在类中 java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write 在接口中 java.io.DataOutputwrite 在接口中 java.io.ObjectOutputwrite 在类中 java.io.OutputStreamjava.io.IOExceptionpublic final void writeBoolean(boolean v)
throws java.io.IOException
writeBoolean 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeByte(int v)
throws java.io.IOException
writeByte 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeBytes(java.lang.String s)
throws java.io.IOException
writeBytes 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeChar(int v)
throws java.io.IOException
writeChar 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeChars(java.lang.String s)
throws java.io.IOException
writeChars 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeDouble(double v)
throws java.io.IOException
writeDouble 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeFloat(float v)
throws java.io.IOException
writeFloat 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeInt(int v)
throws java.io.IOException
writeInt 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeLong(long v)
throws java.io.IOException
writeLong 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeShort(int v)
throws java.io.IOException
writeShort 在接口中 java.io.DataOutputjava.io.IOExceptionpublic final void writeUTF(java.lang.String str)
throws java.io.IOException
writeUTF 在接口中 java.io.DataOutputjava.io.IOException