public class AtomicMarshalOutputStream extends MarshalOutputStream
ObjectOutputStream.PutField
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 |
---|
AtomicMarshalOutputStream(OutputStream out,
ClassLoader defaultLoader,
Collection context,
boolean objectOutputStreamMode) |
AtomicMarshalOutputStream(OutputStream out,
Collection context) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
defaultWriteObject() |
protected void |
drain() |
protected boolean |
enableReplaceObject(boolean enable) |
void |
flush() |
ObjectOutputStream.PutField |
putFields() |
protected Object |
replaceObject(Object obj)
This implementation replaces the following types in the stream:
|
void |
reset()
Reset will disregard the state of any objects already written to the
stream.
|
void |
useProtocolVersion(int version) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
protected void |
writeClassDescriptor(ObjectStreamClass desc) |
void |
writeDouble(double v) |
void |
writeFields() |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObjectOverride(Object obj) |
void |
writeShort(int v) |
void |
writeUnshared(Object obj) |
void |
writeUTF(String s) |
annotateClass, annotateProxyClass, getObjectStreamContext, writeAnnotation
writeObject, writeStreamHeader
public AtomicMarshalOutputStream(OutputStream out, Collection context) throws IOException
IOException
public AtomicMarshalOutputStream(OutputStream out, ClassLoader defaultLoader, Collection context, boolean objectOutputStreamMode) throws IOException
out
- context
- objectOutputStreamMode
- if true stream format is compatible with
ObjectOutputStream, if false, it's compatible with MarshalOutputStream.IOException
public final void writeObjectOverride(Object obj) throws IOException
writeObjectOverride
in class ObjectOutputStream
IOException
public void writeUnshared(Object obj) throws IOException
writeUnshared
in class ObjectOutputStream
IOException
public void write(int b) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
write
in class ObjectOutputStream
IOException
public void write(byte[] b) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
write
in class ObjectOutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
write
in class ObjectOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in interface ObjectOutput
flush
in class ObjectOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface ObjectOutput
close
in interface AutoCloseable
close
in class ObjectOutputStream
IOException
public void writeBoolean(boolean v) throws IOException
writeBoolean
in interface DataOutput
writeBoolean
in class ObjectOutputStream
IOException
public void writeByte(int v) throws IOException
writeByte
in interface DataOutput
writeByte
in class ObjectOutputStream
IOException
public void writeShort(int v) throws IOException
writeShort
in interface DataOutput
writeShort
in class ObjectOutputStream
IOException
public void writeChar(int v) throws IOException
writeChar
in interface DataOutput
writeChar
in class ObjectOutputStream
IOException
public void writeInt(int v) throws IOException
writeInt
in interface DataOutput
writeInt
in class ObjectOutputStream
IOException
public void writeLong(long v) throws IOException
writeLong
in interface DataOutput
writeLong
in class ObjectOutputStream
IOException
public void writeFloat(float v) throws IOException
writeFloat
in interface DataOutput
writeFloat
in class ObjectOutputStream
IOException
public void writeDouble(double v) throws IOException
writeDouble
in interface DataOutput
writeDouble
in class ObjectOutputStream
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
writeBytes
in class ObjectOutputStream
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
writeChars
in class ObjectOutputStream
IOException
public void writeUTF(String s) throws IOException
writeUTF
in interface DataOutput
writeUTF
in class ObjectOutputStream
IOException
protected void drain() throws IOException
drain
in class ObjectOutputStream
IOException
protected boolean enableReplaceObject(boolean enable) throws SecurityException
enableReplaceObject
in class ObjectOutputStream
SecurityException
protected Object replaceObject(Object obj) throws IOException
replaceObject
in class ObjectOutputStream
obj
- IOException
protected void writeClassDescriptor(ObjectStreamClass desc) throws IOException
writeClassDescriptor
in class ObjectOutputStream
IOException
public void useProtocolVersion(int version) throws IOException
useProtocolVersion
in class ObjectOutputStream
IOException
public void reset() throws IOException
reset
in class ObjectOutputStream
IOException
- if reset() is invoked while serializing an object.public void defaultWriteObject() throws IOException
defaultWriteObject
in class ObjectOutputStream
IOException
public ObjectOutputStream.PutField putFields() throws IOException
putFields
in class ObjectOutputStream
IOException
public void writeFields() throws IOException
writeFields
in class ObjectOutputStream
IOException
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.