org.jboss.serial.io
Class JBossObjectInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ObjectInputStream
          extended by org.jboss.serial.io.JBossObjectInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput, java.io.ObjectInput, java.io.ObjectStreamConstants, DataContainerConstants
Direct Known Subclasses:
JBossObjectInputStreamSharedTree

public class JBossObjectInputStream
extends java.io.ObjectInputStream
implements DataContainerConstants

Author:
Clebert Suconic

Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.ObjectInputStream
java.io.ObjectInputStream.GetField
 
Field Summary
 
Fields inherited from interface org.jboss.serial.objectmetamodel.DataContainerConstants
BOOLEAN, BOOLEANOBJ, BYTE, BYTEARRAY, BYTEOBJ, CHARACTER, CHARACTEROBJ, CLASSDEF, closeSign, DOUBLE, DOUBLEOBJ, FLOAT, FLOATOBJ, IMMUTABLE_OBJREF, INTEGER, INTEGEROBJ, LONG, LONGOBJ, NEWDEF, NULLREF, OBJECTDEF, OBJECTREF, openSign, RESET, SHORT, SHORTOBJ, SMARTCLONE_DEF, STRING
 
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
JBossObjectInputStream(java.io.InputStream is)
           
JBossObjectInputStream(java.io.InputStream is, java.lang.ClassLoader loader)
           
JBossObjectInputStream(java.io.InputStream is, java.lang.ClassLoader loader, StringUtilBuffer buffer)
          In case of InputStream is null, the only method that can be used on this class is smartClone
JBossObjectInputStream(java.io.InputStream is, StringUtilBuffer buffer)
           
 
Method Summary
 int available()
          Returns the number of bytes that can be read without blocking.
 void close()
           
 void defaultReadObject()
           
 java.lang.ClassLoader getClassLoader()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] buf, int off, int len)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] buf)
           
 void readFully(byte[] buf, int off, int len)
           
 int readInt()
           
 java.lang.String readLine()
           
 long readLong()
           
 java.lang.Object readObjectOverride()
           
 java.lang.Object readObjectUsingDataContainer()
          This is the old method of reading objects, always loading everything to a datacontainer
 short readShort()
           
 java.lang.Object readUnshared()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void registerValidation(java.io.ObjectInputValidation obj, int prio)
           
 void setClassLoader(java.lang.ClassLoader classLoader)
           
 long skip(long n)
           
 int skipBytes(int len)
           
 
Methods inherited from class java.io.ObjectInputStream
readFields, readObject
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossObjectInputStream

public JBossObjectInputStream(java.io.InputStream is)
                       throws java.io.IOException
Throws:
java.io.IOException

JBossObjectInputStream

public JBossObjectInputStream(java.io.InputStream is,
                              StringUtilBuffer buffer)
                       throws java.io.IOException
Throws:
java.io.IOException

JBossObjectInputStream

public JBossObjectInputStream(java.io.InputStream is,
                              java.lang.ClassLoader loader)
                       throws java.io.IOException
Throws:
java.io.IOException

JBossObjectInputStream

public JBossObjectInputStream(java.io.InputStream is,
                              java.lang.ClassLoader loader,
                              StringUtilBuffer buffer)
                       throws java.io.IOException
In case of InputStream is null, the only method that can be used on this class is smartClone

Throws:
java.io.IOException
Method Detail

readObjectUsingDataContainer

public java.lang.Object readObjectUsingDataContainer()
                                              throws java.io.IOException,
                                                     java.lang.ClassNotFoundException
This is the old method of reading objects, always loading everything to a datacontainer

Throws:
java.io.IOException
java.lang.ClassNotFoundException

readObjectOverride

public java.lang.Object readObjectOverride()
                                    throws java.io.IOException,
                                           java.lang.ClassNotFoundException
Overrides:
readObjectOverride in class java.io.ObjectInputStream
Throws:
java.io.IOException
java.lang.ClassNotFoundException

readUnshared

public java.lang.Object readUnshared()
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
Overrides:
readUnshared in class java.io.ObjectInputStream
Throws:
java.io.IOException
java.lang.ClassNotFoundException

defaultReadObject

public void defaultReadObject()
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
Overrides:
defaultReadObject in class java.io.ObjectInputStream
Throws:
java.io.IOException
java.lang.ClassNotFoundException

registerValidation

public void registerValidation(java.io.ObjectInputValidation obj,
                               int prio)
                        throws java.io.NotActiveException,
                               java.io.InvalidObjectException
Overrides:
registerValidation in class java.io.ObjectInputStream
Throws:
java.io.NotActiveException
java.io.InvalidObjectException

read

public int read()
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.ObjectInputStream
Throws:
java.io.IOException

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.ObjectInputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Returns the number of bytes that can be read without blocking.

Specified by:
available in interface java.io.ObjectInput
Overrides:
available in class java.io.ObjectInputStream
Returns:
the number of available bytes.
Throws:
java.io.IOException - if there are I/O errors while reading from the underlying InputStream

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface java.io.ObjectInput
Overrides:
close in class java.io.ObjectInputStream
Throws:
java.io.IOException

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Specified by:
readBoolean in interface java.io.DataInput
Overrides:
readBoolean in class java.io.ObjectInputStream
Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Specified by:
readByte in interface java.io.DataInput
Overrides:
readByte in class java.io.ObjectInputStream
Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Specified by:
readUnsignedByte in interface java.io.DataInput
Overrides:
readUnsignedByte in class java.io.ObjectInputStream
Throws:
java.io.IOException

readChar

public char readChar()
              throws java.io.IOException
Specified by:
readChar in interface java.io.DataInput
Overrides:
readChar in class java.io.ObjectInputStream
Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Specified by:
readShort in interface java.io.DataInput
Overrides:
readShort in class java.io.ObjectInputStream
Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Specified by:
readUnsignedShort in interface java.io.DataInput
Overrides:
readUnsignedShort in class java.io.ObjectInputStream
Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Specified by:
readInt in interface java.io.DataInput
Overrides:
readInt in class java.io.ObjectInputStream
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Specified by:
readLong in interface java.io.DataInput
Overrides:
readLong in class java.io.ObjectInputStream
Throws:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Specified by:
readFloat in interface java.io.DataInput
Overrides:
readFloat in class java.io.ObjectInputStream
Throws:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Specified by:
readDouble in interface java.io.DataInput
Overrides:
readDouble in class java.io.ObjectInputStream
Throws:
java.io.IOException

readFully

public void readFully(byte[] buf)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Overrides:
readFully in class java.io.ObjectInputStream
Throws:
java.io.IOException

readFully

public void readFully(byte[] buf,
                      int off,
                      int len)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Overrides:
readFully in class java.io.ObjectInputStream
Throws:
java.io.IOException

skipBytes

public int skipBytes(int len)
              throws java.io.IOException
Specified by:
skipBytes in interface java.io.DataInput
Overrides:
skipBytes in class java.io.ObjectInputStream
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Specified by:
readLine in interface java.io.DataInput
Overrides:
readLine in class java.io.ObjectInputStream
Throws:
java.io.IOException

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Specified by:
readUTF in interface java.io.DataInput
Overrides:
readUTF in class java.io.ObjectInputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Specified by:
skip in interface java.io.ObjectInput
Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException

getClassLoader

public java.lang.ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(java.lang.ClassLoader classLoader)


JBoss Serialization, a new approach to java-serialization.