Package org.jboss.marshalling.cloner
Class SerializingCloner.StepObjectOutput
- java.lang.Object
-
- java.io.OutputStream
-
- org.jboss.marshalling.SimpleByteOutput
-
- org.jboss.marshalling.ByteOutputStream
-
- org.jboss.marshalling.SimpleDataOutput
-
- org.jboss.marshalling.AbstractObjectOutput
-
- org.jboss.marshalling.cloner.SerializingCloner.StepObjectOutput
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataOutput
,java.io.Flushable
,java.io.ObjectOutput
,java.lang.AutoCloseable
,ByteOutput
,Marshaller
- Enclosing class:
- SerializingCloner
class SerializingCloner.StepObjectOutput extends AbstractObjectOutput implements Marshaller
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.ByteArrayOutputStream
byteArrayOutputStream
private java.util.Queue<SerializingCloner.Step>
steps
-
Fields inherited from class org.jboss.marshalling.SimpleDataOutput
buffer, bufferSize
-
Fields inherited from class org.jboss.marshalling.ByteOutputStream
byteOutput
-
-
Constructor Summary
Constructors Constructor Description StepObjectOutput(java.util.Queue<SerializingCloner.Step> steps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearClassCache()
Discard the class cache.void
clearInstanceCache()
Discard the instance cache.(package private) void
doFinish()
protected void
doWriteObject(java.lang.Object obj, boolean unshared)
Implementation of the actual object-writing method.void
finish()
Finish writing to a stream.void
flush()
void
start(ByteOutput byteOutput)
Begin writing to a stream.-
Methods inherited from class org.jboss.marshalling.AbstractObjectOutput
writeObject, writeObjectUnshared
-
Methods inherited from class org.jboss.marshalling.SimpleDataOutput
close, shallowFlush, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.marshalling.ByteOutput
write, write, write
-
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from interface org.jboss.marshalling.Marshaller
writeObjectUnshared
-
-
-
-
Field Detail
-
steps
private final java.util.Queue<SerializingCloner.Step> steps
-
byteArrayOutputStream
private final java.io.ByteArrayOutputStream byteArrayOutputStream
-
-
Constructor Detail
-
StepObjectOutput
StepObjectOutput(java.util.Queue<SerializingCloner.Step> steps) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
doWriteObject
protected void doWriteObject(java.lang.Object obj, boolean unshared) throws java.io.IOException
Description copied from class:AbstractObjectOutput
Implementation of the actual object-writing method.- Specified by:
doWriteObject
in classAbstractObjectOutput
- Parameters:
obj
- the object to writeunshared
-true
if the instance is unshared,false
if it is shared- Throws:
java.io.IOException
- if an I/O error occurs
-
clearInstanceCache
public void clearInstanceCache() throws java.io.IOException
Description copied from interface:Marshaller
Discard the instance cache. May also discard the class cache in implementations that do not support separated class and instance caches.- Specified by:
clearInstanceCache
in interfaceMarshaller
- Throws:
java.io.IOException
- if an error occurs
-
clearClassCache
public void clearClassCache() throws java.io.IOException
Description copied from interface:Marshaller
Discard the class cache. Implicitly also discards the instance cache.- Specified by:
clearClassCache
in interfaceMarshaller
- Throws:
java.io.IOException
- if an error occurs
-
start
public void start(ByteOutput byteOutput) throws java.io.IOException
Description copied from class:SimpleDataOutput
Begin writing to a stream.- Specified by:
start
in interfaceMarshaller
- Overrides:
start
in classSimpleDataOutput
- Parameters:
byteOutput
- the new stream- Throws:
java.io.IOException
- if an error occurs
-
finish
public void finish() throws java.io.IOException
Description copied from class:SimpleDataOutput
Finish writing to a stream. The stream is released. No further writing may be done until theSimpleDataOutput.start(ByteOutput)
method is again invoked.- Specified by:
finish
in interfaceMarshaller
- Overrides:
finish
in classSimpleDataOutput
- Throws:
java.io.IOException
- if an error occurs
-
doFinish
void doFinish() throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
Description copied from class:SimpleDataOutput
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in interfacejava.io.ObjectOutput
- Overrides:
flush
in classSimpleDataOutput
- Throws:
java.io.IOException
-
-