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 ObjectOutputStream
ObjectOutputStream.PutField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Objectprivate final RiverMarshallerprivate static final intprivate static final intprivate RiverPutFieldprivate SerializableClassprivate intprivate static final intFields inherited from interface 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
ConstructorsModifierConstructorDescriptionprotectedRiverObjectOutputStream(Marshaller delegateMarshaller, RiverMarshaller marshaller) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate booleancompareAndSetState(int expect, int set) voidprotected voidfinish(int restoreState) protected voidprivate intgetAndSetState(int set) protected intstart()protected SerializableClassswapClass(SerializableClass newSerializableClass) protected ObjectswapCurrent(Object current) voidwrite(byte[] buf) Write all the bytes from the given array to the stream.voidwrite(byte[] buf, int off, int len) Write some of the bytes from the given array to the stream.voidwrite(int val) Writes to the output stream the eight low-order bits of the argumentb.voidwriteBoolean(boolean val) voidwriteByte(int val) voidwriteBytes(String str) voidwriteChar(int val) voidwriteChars(String str) voidwriteDouble(double val) voidvoidwriteFloat(float val) voidwriteInt(int val) voidwriteLong(long val) protected voidvoidwriteShort(int val) voidwriteUnshared(Object obj) voidMethods inherited from class MarshallerObjectOutputStream
annotateClass, annotateProxyClass, close, drain, enableReplaceObject, flush, replaceObject, reset, useProtocolVersion, writeClassDescriptor, writeStreamHeaderMethods inherited from class ObjectOutputStream
writeObjectMethods inherited from class 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:
IOExceptionSecurityException
-
-
Method Details
-
compareAndSetState
private boolean compareAndSetState(int expect, int set) -
getAndSetState
private int getAndSetState(int set) -
writeFields
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeFieldsin classMarshallerObjectOutputStream- Throws:
IOException
-
putFields
Description copied from class:MarshallerObjectOutputStream- Specified by:
putFieldsin classMarshallerObjectOutputStream- Throws:
IOException
-
swapClass
-
swapCurrent
-
defaultWriteObject
Description copied from class:MarshallerObjectOutputStream- Specified by:
defaultWriteObjectin classMarshallerObjectOutputStream- Throws:
IOException
-
start
- Throws:
IOException
-
writeObjectOverride
Description copied from class:MarshallerObjectOutputStream- Overrides:
writeObjectOverridein classMarshallerObjectOutputStream- Throws:
IOException
-
write
Description copied from class:MarshallerObjectOutputStreamWrites to the output stream the eight low-order bits of the argumentb. The 24 high-order bits ofbare ignored.- Specified by:
writein interfaceByteOutput- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classMarshallerObjectOutputStream- Parameters:
val- the byte to write- Throws:
IOException- if an error occurs
-
write
Description copied from class:MarshallerObjectOutputStreamWrite all the bytes from the given array to the stream.- Specified by:
writein interfaceByteOutput- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classMarshallerObjectOutputStream- Parameters:
buf- the byte array- Throws:
IOException- if an error occurs
-
write
Description copied from class:MarshallerObjectOutputStreamWrite some of the bytes from the given array to the stream.- Specified by:
writein interfaceByteOutput- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein 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:
writeBooleanin interfaceDataOutput- Overrides:
writeBooleanin classMarshallerObjectOutputStream- Throws:
IOException
-
writeByte
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeBytein interfaceDataOutput- Overrides:
writeBytein classMarshallerObjectOutputStream- Throws:
IOException
-
writeShort
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeShortin interfaceDataOutput- Overrides:
writeShortin classMarshallerObjectOutputStream- Throws:
IOException
-
writeChar
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeCharin interfaceDataOutput- Overrides:
writeCharin classMarshallerObjectOutputStream- Throws:
IOException
-
writeInt
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeIntin interfaceDataOutput- Overrides:
writeIntin classMarshallerObjectOutputStream- Throws:
IOException
-
writeLong
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeLongin interfaceDataOutput- Overrides:
writeLongin classMarshallerObjectOutputStream- Throws:
IOException
-
writeFloat
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeFloatin interfaceDataOutput- Overrides:
writeFloatin classMarshallerObjectOutputStream- Throws:
IOException
-
writeDouble
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeDoublein interfaceDataOutput- Overrides:
writeDoublein classMarshallerObjectOutputStream- Throws:
IOException
-
writeBytes
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeBytesin interfaceDataOutput- Overrides:
writeBytesin classMarshallerObjectOutputStream- Throws:
IOException
-
writeChars
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeCharsin interfaceDataOutput- Overrides:
writeCharsin classMarshallerObjectOutputStream- Throws:
IOException
-
writeUTF
Description copied from class:MarshallerObjectOutputStream- Specified by:
writeUTFin interfaceDataOutput- Overrides:
writeUTFin classMarshallerObjectOutputStream- Throws:
IOException
-
finish
- Throws:
IOException
-
checkState
- Throws:
IOException
-
fullReset
protected void fullReset()
-