org.jboss.util.stream
Class ObjectOutputStreamAdapter

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ObjectOutputStream
          extended by org.jboss.util.stream.ObjectOutputStreamAdapter
All Implemented Interfaces:
Closeable, DataOutput, Flushable, ObjectOutput, ObjectStreamConstants
Direct Known Subclasses:
AppendingObjectOutputStream, AutoResetObjectOutputStream

public abstract class ObjectOutputStreamAdapter
extends ObjectOutputStream

An ObjectOutputStream wrapping adapter.

Concurrency

This class is not synchronized.

Version:
$Revision: 1.1.28.1 $
Author:
Jason Dillon

Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
 
Field Summary
protected  ObjectOutputStream out
          Nested object output stream
 
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
ObjectOutputStreamAdapter(ObjectOutputStream out)
          Construct a new ObjectOutputStreamAdapter.
 
Method Summary
 void close()
           
 void defaultWriteObject()
           
 void flush()
           
 ObjectOutputStream.PutField putFields()
           
 void reset()
           
 void useProtocolVersion(int version)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int data)
           
 void writeBoolean(boolean data)
           
 void writeByte(int data)
           
 void writeBytes(String data)
           
 void writeChar(int data)
           
 void writeChars(String data)
           
 void writeDouble(double data)
           
 void writeFields()
           
 void writeFloat(float data)
           
 void writeInt(int data)
           
 void writeLong(long data)
           
protected  void writeObjectOverride(Object obj)
           
 void writeShort(int data)
           
 void writeUTF(String s)
           
 
Methods inherited from class java.io.ObjectOutputStream
annotateClass, annotateProxyClass, drain, enableReplaceObject, replaceObject, writeClassDescriptor, writeObject, writeStreamHeader, writeUnshared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected ObjectOutputStream out
Nested object output stream

Constructor Detail

ObjectOutputStreamAdapter

public ObjectOutputStreamAdapter(ObjectOutputStream out)
                          throws IOException
Construct a new ObjectOutputStreamAdapter.

Parameters:
out - An ObjectOutputStream stream.
Throws:
IOException - Any exception thrown by the underlying OutputStream.
IllegalArgumentException - Out is null.
Method Detail

writeObjectOverride

protected void writeObjectOverride(Object obj)
                            throws IOException
Overrides:
writeObjectOverride in class ObjectOutputStream
Throws:
IOException

useProtocolVersion

public void useProtocolVersion(int version)
                        throws IOException
Overrides:
useProtocolVersion in class ObjectOutputStream
Throws:
IOException

defaultWriteObject

public void defaultWriteObject()
                        throws IOException
Overrides:
defaultWriteObject in class ObjectOutputStream
Throws:
IOException

putFields

public ObjectOutputStream.PutField putFields()
                                      throws IOException
Overrides:
putFields in class ObjectOutputStream
Throws:
IOException

writeFields

public void writeFields()
                 throws IOException
Overrides:
writeFields in class ObjectOutputStream
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class ObjectOutputStream
Throws:
IOException

write

public void write(int data)
           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[] b)
           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[] b,
                  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

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface ObjectOutput
Overrides:
close in class ObjectOutputStream
Throws:
IOException

writeBoolean

public void writeBoolean(boolean data)
                  throws IOException
Specified by:
writeBoolean in interface DataOutput
Overrides:
writeBoolean in class ObjectOutputStream
Throws:
IOException

writeByte

public void writeByte(int data)
               throws IOException
Specified by:
writeByte in interface DataOutput
Overrides:
writeByte in class ObjectOutputStream
Throws:
IOException

writeShort

public void writeShort(int data)
                throws IOException
Specified by:
writeShort in interface DataOutput
Overrides:
writeShort in class ObjectOutputStream
Throws:
IOException

writeChar

public void writeChar(int data)
               throws IOException
Specified by:
writeChar in interface DataOutput
Overrides:
writeChar in class ObjectOutputStream
Throws:
IOException

writeInt

public void writeInt(int data)
              throws IOException
Specified by:
writeInt in interface DataOutput
Overrides:
writeInt in class ObjectOutputStream
Throws:
IOException

writeLong

public void writeLong(long data)
               throws IOException
Specified by:
writeLong in interface DataOutput
Overrides:
writeLong in class ObjectOutputStream
Throws:
IOException

writeFloat

public void writeFloat(float data)
                throws IOException
Specified by:
writeFloat in interface DataOutput
Overrides:
writeFloat in class ObjectOutputStream
Throws:
IOException

writeDouble

public void writeDouble(double data)
                 throws IOException
Specified by:
writeDouble in interface DataOutput
Overrides:
writeDouble in class ObjectOutputStream
Throws:
IOException

writeBytes

public void writeBytes(String data)
                throws IOException
Specified by:
writeBytes in interface DataOutput
Overrides:
writeBytes in class ObjectOutputStream
Throws:
IOException

writeChars

public void writeChars(String data)
                throws IOException
Specified by:
writeChars in interface DataOutput
Overrides:
writeChars in class ObjectOutputStream
Throws:
IOException

writeUTF

public void writeUTF(String s)
              throws IOException
Specified by:
writeUTF in interface DataOutput
Overrides:
writeUTF in class ObjectOutputStream
Throws:
IOException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.