Package org.jboss.marshalling.river
Class RiverObjectOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ObjectOutputStream
-
- org.jboss.marshalling.MarshallerObjectOutputStream
-
- org.jboss.marshalling.river.RiverObjectOutputStream
-
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,ObjectOutput
,ObjectStreamConstants
,AutoCloseable
,ByteOutput
public class RiverObjectOutputStream extends MarshallerObjectOutputStream
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
-
-
Field Summary
-
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, SERIAL_FILTER_PERMISSION, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RiverObjectOutputStream(Marshaller delegateMarshaller, RiverMarshaller marshaller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defaultWriteObject()
protected void
finish(int restoreState)
protected void
fullReset()
ObjectOutputStream.PutField
putFields()
protected int
start()
protected SerializableClass
swapClass(SerializableClass newSerializableClass)
protected Object
swapCurrent(Object current)
void
write(byte[] buf)
Write all the bytes from the given array to the stream.void
write(byte[] buf, int off, int len)
Write some of the bytes from the given array to the stream.void
write(int val)
Writes to the output stream the eight low-order bits of the argumentb
.void
writeBoolean(boolean val)
void
writeByte(int val)
void
writeBytes(String str)
void
writeChar(int val)
void
writeChars(String str)
void
writeDouble(double val)
void
writeFields()
void
writeFloat(float val)
void
writeInt(int val)
void
writeLong(long val)
protected void
writeObjectOverride(Object obj)
void
writeShort(int val)
void
writeUnshared(Object obj)
void
writeUTF(String str)
-
Methods inherited from class org.jboss.marshalling.MarshallerObjectOutputStream
annotateClass, annotateProxyClass, close, drain, enableReplaceObject, flush, replaceObject, reset, useProtocolVersion, writeClassDescriptor, writeStreamHeader
-
Methods inherited from class java.io.ObjectOutputStream
writeObject
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
RiverObjectOutputStream
protected RiverObjectOutputStream(Marshaller delegateMarshaller, RiverMarshaller marshaller) throws IOException, SecurityException
- Throws:
IOException
SecurityException
-
-
Method Detail
-
writeFields
public void writeFields() throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeFields
in classMarshallerObjectOutputStream
- Throws:
IOException
-
putFields
public ObjectOutputStream.PutField putFields() throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
putFields
in classMarshallerObjectOutputStream
- Throws:
IOException
-
swapClass
protected SerializableClass swapClass(SerializableClass newSerializableClass)
-
defaultWriteObject
public void defaultWriteObject() throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
defaultWriteObject
in classMarshallerObjectOutputStream
- Throws:
IOException
-
start
protected int start() throws IOException
- Throws:
IOException
-
writeObjectOverride
protected void writeObjectOverride(Object obj) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Overrides:
writeObjectOverride
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeUnshared
public void writeUnshared(Object obj) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Overrides:
writeUnshared
in classMarshallerObjectOutputStream
- Throws:
IOException
-
write
public void write(int val) throws IOException
Description copied from class:MarshallerObjectOutputStream
Writes to the output stream the eight low-order bits of the argumentb
. The 24 high-order bits ofb
are ignored.- Specified by:
write
in interfaceByteOutput
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classMarshallerObjectOutputStream
- Parameters:
val
- the byte to write- Throws:
IOException
- if an error occurs
-
write
public void write(byte[] buf) throws IOException
Description copied from class:MarshallerObjectOutputStream
Write all the bytes from the given array to the stream.- Specified by:
write
in interfaceByteOutput
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classMarshallerObjectOutputStream
- Parameters:
buf
- the byte array- Throws:
IOException
- if an error occurs
-
write
public void write(byte[] buf, int off, int len) throws IOException
Description copied from class:MarshallerObjectOutputStream
Write some of the bytes from the given array to the stream.- Specified by:
write
in interfaceByteOutput
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classMarshallerObjectOutputStream
- Parameters:
buf
- the byte arrayoff
- the index to start writing fromlen
- the number of bytes to write- Throws:
IOException
- if an error occurs
-
writeBoolean
public void writeBoolean(boolean val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeBoolean
in interfaceDataOutput
- Overrides:
writeBoolean
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeByte
public void writeByte(int val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeByte
in interfaceDataOutput
- Overrides:
writeByte
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeShort
public void writeShort(int val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeShort
in interfaceDataOutput
- Overrides:
writeShort
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeChar
public void writeChar(int val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeChar
in interfaceDataOutput
- Overrides:
writeChar
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeInt
public void writeInt(int val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeInt
in interfaceDataOutput
- Overrides:
writeInt
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeLong
public void writeLong(long val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeLong
in interfaceDataOutput
- Overrides:
writeLong
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeFloat
public void writeFloat(float val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeFloat
in interfaceDataOutput
- Overrides:
writeFloat
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeDouble
public void writeDouble(double val) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeDouble
in interfaceDataOutput
- Overrides:
writeDouble
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeBytes
public void writeBytes(String str) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeBytes
in interfaceDataOutput
- Overrides:
writeBytes
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeChars
public void writeChars(String str) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeChars
in interfaceDataOutput
- Overrides:
writeChars
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeUTF
public void writeUTF(String str) throws IOException
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeUTF
in interfaceDataOutput
- Overrides:
writeUTF
in classMarshallerObjectOutputStream
- Throws:
IOException
-
finish
protected void finish(int restoreState) throws IOException
- Throws:
IOException
-
fullReset
protected void fullReset()
-
-