private static class MarshalledInstance.MarshalledInstanceOutputStream extends MarshalOutputStream
MarshalledInstance. It places the location annotations
to one side so that two MarshalledInstances can be
compared for equality if they differ only in location
annotations. Objects written using this stream should be read back
from a MarshalledInstanceInputStream.ObjectOutputStream.PutField| Modifier and Type | Field and Description |
|---|---|
private boolean |
hadAnnotations
true if non-null annotations are
written. |
private ObjectOutputStream |
locOut
The stream on which location objects are written.
|
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| Constructor and Description |
|---|
MarshalledInstanceOutputStream(OutputStream objOut,
OutputStream locOut,
Collection context)
Creates a new
MarshalledObjectOutputStream whose
non-location bytes will be written to objOut and whose
location annotations (if any) will be written to
locOut. |
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
boolean |
hadAnnotations()
Returns
true if any non-null location
annotations have been written to this stream. |
protected void |
writeAnnotation(String loc)
Overrides
MarshalOutputStream.writeAnnotation
implementation to write annotations to the location stream. |
annotateClass, annotateProxyClass, getObjectStreamContextclose, defaultWriteObject, drain, enableReplaceObject, putFields, replaceObject, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeClassDescriptor, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeStreamHeader, writeUnshared, writeUTFprivate ObjectOutputStream locOut
private boolean hadAnnotations
true if non-null annotations are
written.public MarshalledInstanceOutputStream(OutputStream objOut, OutputStream locOut, Collection context) throws IOException
MarshalledObjectOutputStream whose
non-location bytes will be written to objOut and whose
location annotations (if any) will be written to
locOut.IOExceptionpublic boolean hadAnnotations()
true if any non-null location
annotations have been written to this stream.protected void writeAnnotation(String loc) throws IOException
MarshalOutputStream.writeAnnotation
implementation to write annotations to the location stream.writeAnnotation in class MarshalOutputStreamloc - the class annotation string value (possibly
null) to writeIOException - if I/O exception occurs writing the
annotationpublic void flush()
throws IOException
flush in interface Flushableflush in interface ObjectOutputflush in class ObjectOutputStreamIOExceptionCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.