public class RiverObjectOutputStream extends MarshallerObjectOutputStream
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object |
current |
private RiverMarshaller |
marshaller |
private static int |
OFF |
private static int |
ON |
private RiverPutField |
putField |
private SerializableClass |
serializableClass |
private int |
state |
private static int |
UNWRITTEN_FIELDS |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, 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| Modifier | Constructor and Description |
|---|---|
protected |
RiverObjectOutputStream(Marshaller delegateMarshaller,
RiverMarshaller marshaller) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkState() |
private boolean |
compareAndSetState(int expect,
int set) |
void |
defaultWriteObject() |
protected void |
finish(int restoreState) |
protected void |
fullReset() |
private int |
getAndSetState(int set) |
java.io.ObjectOutputStream.PutField |
putFields() |
protected int |
start() |
protected SerializableClass |
swapClass(SerializableClass newSerializableClass) |
protected java.lang.Object |
swapCurrent(java.lang.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 argument
b. |
void |
writeBoolean(boolean val) |
void |
writeByte(int val) |
void |
writeBytes(java.lang.String str) |
void |
writeChar(int val) |
void |
writeChars(java.lang.String str) |
void |
writeDouble(double val) |
void |
writeFields() |
void |
writeFloat(float val) |
void |
writeInt(int val) |
void |
writeLong(long val) |
protected void |
writeObjectOverride(java.lang.Object obj) |
void |
writeShort(int val) |
void |
writeUnshared(java.lang.Object obj) |
void |
writeUTF(java.lang.String str) |
annotateClass, annotateProxyClass, close, drain, enableReplaceObject, flush, replaceObject, reset, useProtocolVersion, writeClassDescriptor, writeStreamHeaderprivate static final int OFF
private static final int UNWRITTEN_FIELDS
private static final int ON
private final RiverMarshaller marshaller
private int state
private RiverPutField putField
private SerializableClass serializableClass
private java.lang.Object current
protected RiverObjectOutputStream(Marshaller delegateMarshaller, RiverMarshaller marshaller) throws java.io.IOException, java.lang.SecurityException
java.io.IOExceptionjava.lang.SecurityExceptionprivate boolean compareAndSetState(int expect,
int set)
private int getAndSetState(int set)
public void writeFields()
throws java.io.IOException
MarshallerObjectOutputStreamwriteFields in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic java.io.ObjectOutputStream.PutField putFields()
throws java.io.IOException
MarshallerObjectOutputStreamputFields in class MarshallerObjectOutputStreamjava.io.IOExceptionprotected SerializableClass swapClass(SerializableClass newSerializableClass)
protected java.lang.Object swapCurrent(java.lang.Object current)
public void defaultWriteObject()
throws java.io.IOException
MarshallerObjectOutputStreamdefaultWriteObject in class MarshallerObjectOutputStreamjava.io.IOExceptionprotected int start()
throws java.io.IOException
java.io.IOExceptionprotected void writeObjectOverride(java.lang.Object obj)
throws java.io.IOException
MarshallerObjectOutputStreamwriteObjectOverride in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeUnshared(java.lang.Object obj)
throws java.io.IOException
MarshallerObjectOutputStreamwriteUnshared in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void write(int val)
throws java.io.IOException
MarshallerObjectOutputStreamb. The 24 high-order bits of
b are ignored.write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputwrite in interface ByteOutputwrite in class MarshallerObjectOutputStreamval - the byte to writejava.io.IOException - if an error occurspublic void write(byte[] buf)
throws java.io.IOException
MarshallerObjectOutputStreamwrite in interface java.io.DataOutputwrite in interface java.io.ObjectOutputwrite in interface ByteOutputwrite in class MarshallerObjectOutputStreambuf - the byte arrayjava.io.IOException - if an error occurspublic void write(byte[] buf,
int off,
int len)
throws java.io.IOException
MarshallerObjectOutputStreamwrite in interface java.io.DataOutputwrite in interface java.io.ObjectOutputwrite in interface ByteOutputwrite in class MarshallerObjectOutputStreambuf - the byte arrayoff - the index to start writing fromlen - the number of bytes to writejava.io.IOException - if an error occurspublic void writeBoolean(boolean val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteBoolean in interface java.io.DataOutputwriteBoolean in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeByte(int val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteByte in interface java.io.DataOutputwriteByte in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeShort(int val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteShort in interface java.io.DataOutputwriteShort in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeChar(int val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteChar in interface java.io.DataOutputwriteChar in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeInt(int val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteInt in interface java.io.DataOutputwriteInt in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeLong(long val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteLong in interface java.io.DataOutputwriteLong in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeFloat(float val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteFloat in interface java.io.DataOutputwriteFloat in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeDouble(double val)
throws java.io.IOException
MarshallerObjectOutputStreamwriteDouble in interface java.io.DataOutputwriteDouble in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeBytes(java.lang.String str)
throws java.io.IOException
MarshallerObjectOutputStreamwriteBytes in interface java.io.DataOutputwriteBytes in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeChars(java.lang.String str)
throws java.io.IOException
MarshallerObjectOutputStreamwriteChars in interface java.io.DataOutputwriteChars in class MarshallerObjectOutputStreamjava.io.IOExceptionpublic void writeUTF(java.lang.String str)
throws java.io.IOException
MarshallerObjectOutputStreamwriteUTF in interface java.io.DataOutputwriteUTF in class MarshallerObjectOutputStreamjava.io.IOExceptionprotected void finish(int restoreState)
throws java.io.IOException
java.io.IOExceptionprivate void checkState()
throws java.io.IOException
java.io.IOExceptionprotected void fullReset()