Package org.jboss.marshalling
Class MarshallerObjectOutput
- java.lang.Object
-
- org.jboss.marshalling.MarshallerObjectOutput
-
- All Implemented Interfaces:
DataOutput,ObjectOutput,AutoCloseable
public class MarshallerObjectOutput extends Object implements ObjectOutput
A marshaller's object output. This implementation delegates to aMarshallerimplementation while throwing an exception ifclose()is called.This class is not part of the marshalling API; rather it is intended for marshaller implementors to make it easier to develop Java serialization-compatible marshallers.
-
-
Constructor Summary
Constructors Constructor Description MarshallerObjectOutput(Marshaller marshaller)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This implementation always throws anIllegalStateException.voidflush()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)voidwriteBoolean(boolean v)voidwriteByte(int v)voidwriteBytes(String s)voidwriteChar(int v)voidwriteChars(String s)voidwriteDouble(double v)voidwriteFloat(float v)voidwriteInt(int v)voidwriteLong(long v)voidwriteObject(Object obj)voidwriteShort(int v)voidwriteUTF(String s)
-
-
-
Constructor Detail
-
MarshallerObjectOutput
public MarshallerObjectOutput(Marshaller marshaller)
Construct a new instance.- Parameters:
marshaller- the marshaller to delegate to
-
-
Method Detail
-
writeObject
public void writeObject(Object obj) throws IOException
- Specified by:
writeObjectin interfaceObjectOutput- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceObjectOutput- Throws:
IOException
-
close
public void close() throws IOExceptionThis implementation always throws anIllegalStateException.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceObjectOutput- Throws:
IOException
-
writeBoolean
public void writeBoolean(boolean v) throws IOException- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeByte
public void writeByte(int v) throws IOException- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeShort
public void writeShort(int v) throws IOException- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeChar
public void writeChar(int v) throws IOException- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeInt
public void writeInt(int v) throws IOException- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeLong
public void writeLong(long v) throws IOException- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeFloat
public void writeFloat(float v) throws IOException- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeDouble
public void writeDouble(double v) throws IOException- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeBytes
public void writeBytes(String s) throws IOException
- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChars
public void writeChars(String s) throws IOException
- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeUTF
public void writeUTF(String s) throws IOException
- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-
-