com.thoughtworks.xstream.core.util
Class CustomObjectInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.ObjectInputStream
          extended bycom.thoughtworks.xstream.core.util.CustomObjectInputStream
All Implemented Interfaces:
java.io.DataInput, java.io.ObjectInput, java.io.ObjectStreamConstants

public class CustomObjectInputStream
extends java.io.ObjectInputStream


Nested Class Summary
static interface CustomObjectInputStream.StreamCallback
           
 
Nested classes inherited from class java.io.ObjectInputStream
java.io.ObjectInputStream.GetField
 
Field Summary
 
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, 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_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
 
Constructor Summary
CustomObjectInputStream(CustomObjectInputStream.StreamCallback callback)
          Warning, this object is expensive to create (due to functionality inherited from superclass).
 
Method Summary
 int available()
          Unsupported methods
 void close()
           
 void defaultReadObject()
           
static CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback)
           
 void mark(int readlimit)
           
 boolean markSupported()
           
 CustomObjectInputStream.StreamCallback peekCallback()
           
 CustomObjectInputStream.StreamCallback popCallback()
           
 void pushCallback(CustomObjectInputStream.StreamCallback callback)
          Allows the CustomObjectInputStream (which is expensive to create) to be reused.
 int read()
           
 int read(byte[] b)
           
 int read(byte[] buf, int off, int len)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 java.io.ObjectInputStream.GetField readFields()
           
 float readFloat()
           
 void readFully(byte[] buf)
           
 void readFully(byte[] buf, int off, int len)
           
 int readInt()
           
 java.lang.String readLine()
           
 long readLong()
           
protected  java.lang.Object readObjectOverride()
           
 short readShort()
           
 java.lang.Object readUnshared()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void registerValidation(java.io.ObjectInputValidation validation, int priority)
           
 void reset()
           
 long skip(long n)
           
 int skipBytes(int len)
           
 
Methods inherited from class java.io.ObjectInputStream
enableResolveObject, readClassDescriptor, readObject, readStreamHeader, resolveClass, resolveObject, resolveProxyClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomObjectInputStream

public CustomObjectInputStream(CustomObjectInputStream.StreamCallback callback)
                        throws java.io.IOException,
                               java.lang.SecurityException
Warning, this object is expensive to create (due to functionality inherited from superclass). Use the static fetch() method instead, wherever possible.

See Also:
getInstance(com.thoughtworks.xstream.converters.DataHolder, com.thoughtworks.xstream.core.util.CustomObjectInputStream.StreamCallback)
Method Detail

getInstance

public static CustomObjectInputStream getInstance(DataHolder whereFrom,
                                                  CustomObjectInputStream.StreamCallback callback)

pushCallback

public void pushCallback(CustomObjectInputStream.StreamCallback callback)
Allows the CustomObjectInputStream (which is expensive to create) to be reused.


popCallback

public CustomObjectInputStream.StreamCallback popCallback()

peekCallback

public CustomObjectInputStream.StreamCallback peekCallback()

defaultReadObject

public void defaultReadObject()
                       throws java.io.IOException
Throws:
java.io.IOException

readObjectOverride

protected java.lang.Object readObjectOverride()
                                       throws java.io.IOException
Throws:
java.io.IOException

readUnshared

public java.lang.Object readUnshared()
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Throws:
java.io.IOException

readChar

public char readChar()
              throws java.io.IOException
Throws:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Throws:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Throws:
java.io.IOException

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Throws:
java.io.IOException

readFully

public void readFully(byte[] buf)
               throws java.io.IOException
Throws:
java.io.IOException

readFully

public void readFully(byte[] buf,
                      int off,
                      int len)
               throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Throws:
java.io.IOException

readFields

public java.io.ObjectInputStream.GetField readFields()
                                              throws java.io.IOException
Throws:
java.io.IOException

registerValidation

public void registerValidation(java.io.ObjectInputValidation validation,
                               int priority)
                        throws java.io.NotActiveException,
                               java.io.InvalidObjectException
Throws:
java.io.NotActiveException
java.io.InvalidObjectException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

available

public int available()
Unsupported methods


readLine

public java.lang.String readLine()

skipBytes

public int skipBytes(int len)

skip

public long skip(long n)

mark

public void mark(int readlimit)

reset

public void reset()

markSupported

public boolean markSupported()


Copyright © 2004-2007 XStream. All Rights Reserved.