public class ObjectEncoderOutputStream
extends java.io.OutputStream
implements java.io.ObjectOutput
| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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 in interface java.io.ObjectOutputjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputwrite in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.io.ObjectOutputclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in interface java.io.ObjectOutputflush in class java.io.OutputStreamjava.io.IOExceptionpublic final int size()
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputwrite in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputwrite in class java.io.OutputStreamjava.io.IOExceptionpublic final void writeBoolean(boolean v)
throws java.io.IOException
writeBoolean in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeByte(int v)
throws java.io.IOException
writeByte in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeBytes(java.lang.String s)
throws java.io.IOException
writeBytes in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeChar(int v)
throws java.io.IOException
writeChar in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeChars(java.lang.String s)
throws java.io.IOException
writeChars in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeDouble(double v)
throws java.io.IOException
writeDouble in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeFloat(float v)
throws java.io.IOException
writeFloat in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeInt(int v)
throws java.io.IOException
writeInt in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeLong(long v)
throws java.io.IOException
writeLong in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeShort(int v)
throws java.io.IOException
writeShort in interface java.io.DataOutputjava.io.IOExceptionpublic final void writeUTF(java.lang.String str)
throws java.io.IOException
writeUTF in interface java.io.DataOutputjava.io.IOExceptionCopyright © 2008–2018 The Netty Project. All rights reserved.