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.ByteArrayOutputStreambyteArrayOutputStreamprivate 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 voidclearClassCache()Discard the class cache.voidclearInstanceCache()Discard the instance cache.(package private) voiddoFinish()protected voiddoWriteObject(java.lang.Object obj, boolean unshared)Implementation of the actual object-writing method.voidfinish()Finish writing to a stream.voidflush()voidstart(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.IOExceptionDescription copied from class:AbstractObjectOutputImplementation of the actual object-writing method.- Specified by:
doWriteObjectin classAbstractObjectOutput- Parameters:
obj- the object to writeunshared-trueif the instance is unshared,falseif it is shared- Throws:
java.io.IOException- if an I/O error occurs
-
clearInstanceCache
public void clearInstanceCache() throws java.io.IOExceptionDescription copied from interface:MarshallerDiscard the instance cache. May also discard the class cache in implementations that do not support separated class and instance caches.- Specified by:
clearInstanceCachein interfaceMarshaller- Throws:
java.io.IOException- if an error occurs
-
clearClassCache
public void clearClassCache() throws java.io.IOExceptionDescription copied from interface:MarshallerDiscard the class cache. Implicitly also discards the instance cache.- Specified by:
clearClassCachein interfaceMarshaller- Throws:
java.io.IOException- if an error occurs
-
start
public void start(ByteOutput byteOutput) throws java.io.IOException
Description copied from class:SimpleDataOutputBegin writing to a stream.- Specified by:
startin interfaceMarshaller- Overrides:
startin classSimpleDataOutput- Parameters:
byteOutput- the new stream- Throws:
java.io.IOException- if an error occurs
-
finish
public void finish() throws java.io.IOExceptionDescription copied from class:SimpleDataOutputFinish writing to a stream. The stream is released. No further writing may be done until theSimpleDataOutput.start(ByteOutput)method is again invoked.- Specified by:
finishin interfaceMarshaller- Overrides:
finishin 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.IOExceptionDescription copied from class:SimpleDataOutput- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin interfacejava.io.ObjectOutput- Overrides:
flushin classSimpleDataOutput- Throws:
java.io.IOException
-
-