org.apache.mina.filter.codec.serialization

Class ObjectSerializationOutputStream

Implemented Interfaces:
ObjectOutput

public class ObjectSerializationOutputStream
extends OutputStream
implements ObjectOutput

An ObjectOutput and OutputStream that can write the objects as the serialized form that ObjectSerializationDecoder can decode.

Constructor Summary

ObjectSerializationOutputStream(OutputStream out)

Method Summary

void
close()
void
flush()
int
getMaxObjectSize()
Returns the allowed maximum size of the encoded object.
void
setMaxObjectSize(int maxObjectSize)
Sets the allowed maximum size of the encoded object.
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(String s)
void
writeChar(int v)
void
writeChars(String s)
void
writeDouble(double v)
void
writeFloat(float v)
void
writeInt(int v)
void
writeLong(long v)
void
writeObject(Object obj)
void
writeShort(int v)
void
writeUTF(String str)

Constructor Details

ObjectSerializationOutputStream

public ObjectSerializationOutputStream(OutputStream out)

Method Details

close

public void close()
            throws IOException

flush

public void flush()
            throws IOException

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.

write

public void write(byte[] b)
            throws IOException

write

public void write(byte[] b,
                  int off,
                  int len)
            throws IOException

write

public void write(int b)
            throws IOException

writeBoolean

public void writeBoolean(boolean v)
            throws IOException

writeByte

public void writeByte(int v)
            throws IOException

writeBytes

public void writeBytes(String s)
            throws IOException

writeChar

public void writeChar(int v)
            throws IOException

writeChars

public void writeChars(String s)
            throws IOException

writeDouble

public void writeDouble(double v)
            throws IOException

writeFloat

public void writeFloat(float v)
            throws IOException

writeInt

public void writeInt(int v)
            throws IOException

writeLong

public void writeLong(long v)
            throws IOException

writeObject

public void writeObject(Object obj)
            throws IOException

writeShort

public void writeShort(int v)
            throws IOException

writeUTF

public void writeUTF(String str)
            throws IOException