JBoss Marshalling 1.3.0.CR9

org.jboss.marshalling
Class MarshallingObjectOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ObjectOutputStream
          extended by org.jboss.marshalling.MarshallingObjectOutputStream
All Implemented Interfaces:
Closeable, DataOutput, Flushable, ObjectOutput, ObjectStreamConstants

public final class MarshallingObjectOutputStream
extends ObjectOutputStream

An object output stream which wraps a Marshaller, which may be used by legacy ObjectOutputStream-based applications that wish to use the marshalling framework.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
 
Field Summary
 
Fields inherited from interface java.io.ObjectStreamConstants
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 Summary
protected MarshallingObjectOutputStream(Marshaller marshaller, ByteOutput byteOutput)
          Construct a new instance that delegates to the given marshaller.
 
Method Summary
protected  void annotateClass(Class<?> cl)
          
protected  void annotateProxyClass(Class<?> cl)
          
 void close()
          
 void defaultWriteObject()
          
protected  void drain()
          
protected  boolean enableReplaceObject(boolean enable)
          
 void flush()
          
 ObjectOutputStream.PutField putFields()
          
protected  Object replaceObject(Object obj)
          
 void reset()
          
 void useProtocolVersion(int version)
          
 void write(byte[] buf)
          
 void write(byte[] buf, int off, int len)
          
 void write(int val)
          
 void writeBoolean(boolean val)
          
 void writeByte(int val)
          
 void writeBytes(String str)
          
 void writeChar(int val)
          
 void writeChars(String str)
          
protected  void writeClassDescriptor(ObjectStreamClass desc)
          
 void writeDouble(double val)
          
 void writeFields()
          
 void writeFloat(float val)
          
 void writeInt(int val)
          
 void writeLong(long val)
          
protected  void writeObjectOverride(Object obj)
          
 void writeShort(int val)
          
protected  void writeStreamHeader()
          
 void writeUnshared(Object obj)
          
 void writeUTF(String str)
          
 
Methods inherited from class java.io.ObjectOutputStream
writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshallingObjectOutputStream

protected MarshallingObjectOutputStream(Marshaller marshaller,
                                        ByteOutput byteOutput)
                                 throws IOException,
                                        SecurityException
Construct a new instance that delegates to the given marshaller.

Parameters:
marshaller - the delegate marshaller
Throws:
IOException - if an I/O error occurs
SecurityException - if the caller does not have permission to construct an instance of this class
Method Detail

writeObjectOverride

protected void writeObjectOverride(Object obj)
                            throws IOException

Overrides:
writeObjectOverride in class ObjectOutputStream
Throws:
IOException

writeUnshared

public void writeUnshared(Object obj)
                   throws IOException

Overrides:
writeUnshared in class ObjectOutputStream
Throws:
IOException

write

public void write(int val)
           throws IOException

Specified by:
write in interface DataOutput
Specified by:
write in interface ObjectOutput
Overrides:
write in class ObjectOutputStream
Throws:
IOException

write

public void write(byte[] buf)
           throws IOException

Specified by:
write in interface DataOutput
Specified by:
write in interface ObjectOutput
Overrides:
write in class ObjectOutputStream
Throws:
IOException

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws IOException

Specified by:
write in interface DataOutput
Specified by:
write in interface ObjectOutput
Overrides:
write in class ObjectOutputStream
Throws:
IOException

flush

public void flush()
           throws IOException

Specified by:
flush in interface Flushable
Specified by:
flush in interface ObjectOutput
Overrides:
flush in class ObjectOutputStream
Throws:
IOException

writeBoolean

public void writeBoolean(boolean val)
                  throws IOException

Specified by:
writeBoolean in interface DataOutput
Overrides:
writeBoolean in class ObjectOutputStream
Throws:
IOException

writeByte

public void writeByte(int val)
               throws IOException

Specified by:
writeByte in interface DataOutput
Overrides:
writeByte in class ObjectOutputStream
Throws:
IOException

writeShort

public void writeShort(int val)
                throws IOException

Specified by:
writeShort in interface DataOutput
Overrides:
writeShort in class ObjectOutputStream
Throws:
IOException

writeChar

public void writeChar(int val)
               throws IOException

Specified by:
writeChar in interface DataOutput
Overrides:
writeChar in class ObjectOutputStream
Throws:
IOException

writeInt

public void writeInt(int val)
              throws IOException

Specified by:
writeInt in interface DataOutput
Overrides:
writeInt in class ObjectOutputStream
Throws:
IOException

writeLong

public void writeLong(long val)
               throws IOException

Specified by:
writeLong in interface DataOutput
Overrides:
writeLong in class ObjectOutputStream
Throws:
IOException

writeFloat

public void writeFloat(float val)
                throws IOException

Specified by:
writeFloat in interface DataOutput
Overrides:
writeFloat in class ObjectOutputStream
Throws:
IOException

writeDouble

public void writeDouble(double val)
                 throws IOException

Specified by:
writeDouble in interface DataOutput
Overrides:
writeDouble in class ObjectOutputStream
Throws:
IOException

writeBytes

public void writeBytes(String str)
                throws IOException

Specified by:
writeBytes in interface DataOutput
Overrides:
writeBytes in class ObjectOutputStream
Throws:
IOException

writeChars

public void writeChars(String str)
                throws IOException

Specified by:
writeChars in interface DataOutput
Overrides:
writeChars in class ObjectOutputStream
Throws:
IOException

writeUTF

public void writeUTF(String str)
              throws IOException

Specified by:
writeUTF in interface DataOutput
Overrides:
writeUTF in class ObjectOutputStream
Throws:
IOException

reset

public final void reset()
                 throws IOException

Overrides:
reset in class ObjectOutputStream
Throws:
IOException

close

public final void close()
                 throws IOException

Specified by:
close in interface Closeable
Specified by:
close in interface ObjectOutput
Overrides:
close in class ObjectOutputStream
Throws:
IOException

useProtocolVersion

public final void useProtocolVersion(int version)
                              throws IOException

Overrides:
useProtocolVersion in class ObjectOutputStream
Throws:
IOException

annotateClass

protected final void annotateClass(Class<?> cl)
                            throws IOException

Overrides:
annotateClass in class ObjectOutputStream
Throws:
IOException

annotateProxyClass

protected final void annotateProxyClass(Class<?> cl)
                                 throws IOException

Overrides:
annotateProxyClass in class ObjectOutputStream
Throws:
IOException

replaceObject

protected final Object replaceObject(Object obj)
                              throws IOException

Overrides:
replaceObject in class ObjectOutputStream
Throws:
IOException

enableReplaceObject

protected final boolean enableReplaceObject(boolean enable)
                                     throws SecurityException

Overrides:
enableReplaceObject in class ObjectOutputStream
Throws:
SecurityException

writeStreamHeader

protected final void writeStreamHeader()
                                throws IOException

Overrides:
writeStreamHeader in class ObjectOutputStream
Throws:
IOException

writeClassDescriptor

protected final void writeClassDescriptor(ObjectStreamClass desc)
                                   throws IOException

Overrides:
writeClassDescriptor in class ObjectOutputStream
Throws:
IOException

drain

protected final void drain()
                    throws IOException

Overrides:
drain in class ObjectOutputStream
Throws:
IOException

writeFields

public void writeFields()
                 throws IOException

Overrides:
writeFields in class ObjectOutputStream
Throws:
IOException

putFields

public ObjectOutputStream.PutField putFields()
                                      throws IOException

Overrides:
putFields in class ObjectOutputStream
Throws:
IOException

defaultWriteObject

public void defaultWriteObject()
                        throws IOException

Overrides:
defaultWriteObject in class ObjectOutputStream
Throws:
IOException

JBoss Marshalling 1.3.0.CR9

Copyright © 2011 JBoss, a division of Red Hat, Inc.