org.apache.mina.filter.codec.serialization
Class ObjectSerializationOutputStream
java.lang.Object
java.io.OutputStream
org.apache.mina.filter.codec.serialization.ObjectSerializationOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput
public class ObjectSerializationOutputStream
- extends java.io.OutputStream
- implements java.io.ObjectOutput
An ObjectOutput
and OutputStream
that can write the objects as
the serialized form that ObjectSerializationDecoder
can decode.
- Author:
- Apache MINA Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectSerializationOutputStream
public ObjectSerializationOutputStream(java.io.OutputStream out)
getMaxObjectSize
public int getMaxObjectSize()
- Returns the allowed maximum size of the encoded object.
If the size of the encoded object exceeds this value, this encoder
will throw a
IllegalArgumentException
. The default value
is Integer.MAX_VALUE
.
setMaxObjectSize
public void setMaxObjectSize(int maxObjectSize)
- Sets the allowed maximum size of the encoded object.
If the size of the encoded object exceeds this value, this encoder
will throw a
IllegalArgumentException
. The default value
is Integer.MAX_VALUE
.
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in interface java.io.ObjectOutput
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Specified by:
flush
in interface java.io.ObjectOutput
- Overrides:
flush
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in interface java.io.ObjectOutput
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in interface java.io.ObjectOutput
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in interface java.io.ObjectOutput
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
writeObject
public void writeObject(java.lang.Object obj)
throws java.io.IOException
- Specified by:
writeObject
in interface java.io.ObjectOutput
- Throws:
java.io.IOException
writeBoolean
public void writeBoolean(boolean v)
throws java.io.IOException
- Specified by:
writeBoolean
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeByte
public void writeByte(int v)
throws java.io.IOException
- Specified by:
writeByte
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeBytes
public void writeBytes(java.lang.String s)
throws java.io.IOException
- Specified by:
writeBytes
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeChar
public void writeChar(int v)
throws java.io.IOException
- Specified by:
writeChar
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeChars
public void writeChars(java.lang.String s)
throws java.io.IOException
- Specified by:
writeChars
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeDouble
public void writeDouble(double v)
throws java.io.IOException
- Specified by:
writeDouble
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeFloat
public void writeFloat(float v)
throws java.io.IOException
- Specified by:
writeFloat
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeInt
public void writeInt(int v)
throws java.io.IOException
- Specified by:
writeInt
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeLong
public void writeLong(long v)
throws java.io.IOException
- Specified by:
writeLong
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeShort
public void writeShort(int v)
throws java.io.IOException
- Specified by:
writeShort
in interface java.io.DataOutput
- Throws:
java.io.IOException
writeUTF
public void writeUTF(java.lang.String str)
throws java.io.IOException
- Specified by:
writeUTF
in interface java.io.DataOutput
- Throws:
java.io.IOException
Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.