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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
private final RiverMarshaller
private static final int
private static final int
private RiverPutField
private SerializableClass
private int
private static final int
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
ConstructorsModifierConstructorDescriptionprotected
RiverObjectOutputStream
(Marshaller delegateMarshaller, RiverMarshaller marshaller) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private boolean
compareAndSetState
(int expect, int set) void
protected void
finish
(int restoreState) protected void
private int
getAndSetState
(int set) 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
void
writeFloat
(float val) void
writeInt
(int val) void
writeLong
(long val) protected void
void
writeShort
(int val) void
writeUnshared
(Object obj) void
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
-
Field Details
-
OFF
private static final int OFF- See Also:
-
UNWRITTEN_FIELDS
private static final int UNWRITTEN_FIELDS- See Also:
-
ON
private static final int ON- See Also:
-
marshaller
-
state
private int state -
putField
-
serializableClass
-
current
-
-
Constructor Details
-
RiverObjectOutputStream
protected RiverObjectOutputStream(Marshaller delegateMarshaller, RiverMarshaller marshaller) throws IOException, SecurityException - Throws:
IOException
SecurityException
-
-
Method Details
-
compareAndSetState
private boolean compareAndSetState(int expect, int set) -
getAndSetState
private int getAndSetState(int set) -
writeFields
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeFields
in classMarshallerObjectOutputStream
- Throws:
IOException
-
putFields
Description copied from class:MarshallerObjectOutputStream
- Specified by:
putFields
in classMarshallerObjectOutputStream
- Throws:
IOException
-
swapClass
-
swapCurrent
-
defaultWriteObject
Description copied from class:MarshallerObjectOutputStream
- Specified by:
defaultWriteObject
in classMarshallerObjectOutputStream
- Throws:
IOException
-
start
- Throws:
IOException
-
writeObjectOverride
Description copied from class:MarshallerObjectOutputStream
- Overrides:
writeObjectOverride
in classMarshallerObjectOutputStream
- Throws:
IOException
-
write
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
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
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
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeBoolean
in interfaceDataOutput
- Overrides:
writeBoolean
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeByte
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeByte
in interfaceDataOutput
- Overrides:
writeByte
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeShort
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeShort
in interfaceDataOutput
- Overrides:
writeShort
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeChar
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeChar
in interfaceDataOutput
- Overrides:
writeChar
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeInt
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeInt
in interfaceDataOutput
- Overrides:
writeInt
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeLong
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeLong
in interfaceDataOutput
- Overrides:
writeLong
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeFloat
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeFloat
in interfaceDataOutput
- Overrides:
writeFloat
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeDouble
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeDouble
in interfaceDataOutput
- Overrides:
writeDouble
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeBytes
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeBytes
in interfaceDataOutput
- Overrides:
writeBytes
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeChars
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeChars
in interfaceDataOutput
- Overrides:
writeChars
in classMarshallerObjectOutputStream
- Throws:
IOException
-
writeUTF
Description copied from class:MarshallerObjectOutputStream
- Specified by:
writeUTF
in interfaceDataOutput
- Overrides:
writeUTF
in classMarshallerObjectOutputStream
- Throws:
IOException
-
finish
- Throws:
IOException
-
checkState
- Throws:
IOException
-
fullReset
protected void fullReset()
-