JBoss Marshalling 1.3.0.CR9

org.jboss.marshalling
Class UnmarshallingObjectInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ObjectInputStream
          extended by org.jboss.marshalling.UnmarshallingObjectInputStream
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, ObjectStreamConstants

public final class UnmarshallingObjectInputStream
extends ObjectInputStream

An object input stream which wraps an Unmarshaller, which may be used by legacy ObjectInputStream-based applications that wish to use the marshalling framework.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.ObjectInputStream
ObjectInputStream.GetField
 
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
UnmarshallingObjectInputStream(Unmarshaller unmarshaller, ByteInput byteInput)
          Construct a new instance which delegates to the given unmarshaller, reading from the given input.
UnmarshallingObjectInputStream(Unmarshaller unmarshaller, InputStream stream)
          Construct a new instance which delegates to the given unmarshaller, reading from the given input.
 
Method Summary
 int available()
           
 void close()
           
 void defaultReadObject()
          May not be invoked in this context.
protected  boolean enableResolveObject(boolean enable)
          
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
protected  ObjectStreamClass readClassDescriptor()
          
 double readDouble()
           
 ObjectInputStream.GetField readFields()
          May not be invoked in this context.
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 int readInt()
           
 String readLine()
          Deprecated. 
 long readLong()
           
protected  Object readObjectOverride()
           
 Object readObjectUnshared()
           
 short readShort()
           
protected  void readStreamHeader()
          
 Object readUnshared()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 String readUTF()
           
 void registerValidation(ObjectInputValidation obj, int prio)
          May not be invoked in this context.
protected  Class<?> resolveClass(ObjectStreamClass desc)
          
protected  Object resolveObject(Object obj)
          
protected  Class<?> resolveProxyClass(String[] interfaces)
          
 long skip(long n)
           
 int skipBytes(int n)
           
 
Methods inherited from class java.io.ObjectInputStream
readObject
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnmarshallingObjectInputStream

public UnmarshallingObjectInputStream(Unmarshaller unmarshaller,
                                      InputStream stream)
                               throws IOException,
                                      SecurityException
Construct a new instance which delegates to the given unmarshaller, reading from the given input. The unmarshaller will read from the input stream until it is closed.

Parameters:
unmarshaller - the delegate unmarshaller
stream - the input stream to read from
Throws:
IOException - if an I/O error occurs
SecurityException - if the caller does not have permission to construct an instance of this class

UnmarshallingObjectInputStream

public UnmarshallingObjectInputStream(Unmarshaller unmarshaller,
                                      ByteInput byteInput)
                               throws IOException,
                                      SecurityException
Construct a new instance which delegates to the given unmarshaller, reading from the given input. The unmarshaller will read from the input stream until it is closed.

Parameters:
unmarshaller - the delegate unmarshaller
byteInput - the input stream to read from
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

readUnshared

public Object readUnshared()
                    throws IOException,
                           ClassNotFoundException
Overrides:
readUnshared in class ObjectInputStream
Throws:
IOException
ClassNotFoundException

readObjectOverride

protected Object readObjectOverride()
                             throws ClassNotFoundException,
                                    IOException
Overrides:
readObjectOverride in class ObjectInputStream
Throws:
ClassNotFoundException
IOException

read

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

read

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

read

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

skip

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

available

public int available()
              throws IOException
Specified by:
available in interface ObjectInput
Overrides:
available in class ObjectInputStream
Throws:
IOException

close

public void close()
           throws IOException,
                  IllegalStateException
Specified by:
close in interface Closeable
Specified by:
close in interface ObjectInput
Overrides:
close in class ObjectInputStream
Throws:
IOException
IllegalStateException

readFully

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

readFully

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

skipBytes

public int skipBytes(int n)
              throws IOException
Specified by:
skipBytes in interface DataInput
Overrides:
skipBytes in class ObjectInputStream
Throws:
IOException

readBoolean

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

readByte

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

readUnsignedByte

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

readShort

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

readUnsignedShort

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

readChar

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

readInt

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

readLong

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

readFloat

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

readDouble

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

readLine

@Deprecated
public String readLine()
                throws IOException
Deprecated. 

Specified by:
readLine in interface DataInput
Overrides:
readLine in class ObjectInputStream
Throws:
IOException

readUTF

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

readObjectUnshared

public Object readObjectUnshared()
                          throws ClassNotFoundException,
                                 IOException
Throws:
ClassNotFoundException
IOException

resolveClass

protected final Class<?> resolveClass(ObjectStreamClass desc)
                               throws IllegalStateException

Overrides:
resolveClass in class ObjectInputStream
Throws:
IllegalStateException

resolveProxyClass

protected final Class<?> resolveProxyClass(String[] interfaces)
                                    throws IllegalStateException

Overrides:
resolveProxyClass in class ObjectInputStream
Throws:
IllegalStateException

resolveObject

protected final Object resolveObject(Object obj)
                              throws IllegalStateException

Overrides:
resolveObject in class ObjectInputStream
Throws:
IllegalStateException

enableResolveObject

protected final boolean enableResolveObject(boolean enable)
                                     throws IllegalStateException

Overrides:
enableResolveObject in class ObjectInputStream
Throws:
IllegalStateException

readStreamHeader

protected final void readStreamHeader()
                               throws IllegalStateException

Overrides:
readStreamHeader in class ObjectInputStream
Throws:
IllegalStateException

readClassDescriptor

protected final ObjectStreamClass readClassDescriptor()
                                               throws IllegalStateException

Overrides:
readClassDescriptor in class ObjectInputStream
Throws:
IllegalStateException

defaultReadObject

public void defaultReadObject()
                       throws IllegalStateException
May not be invoked in this context.

Overrides:
defaultReadObject in class ObjectInputStream
Throws:
IllegalStateException - always

readFields

public ObjectInputStream.GetField readFields()
                                      throws IllegalStateException
May not be invoked in this context.

Overrides:
readFields in class ObjectInputStream
Throws:
IllegalStateException - always

registerValidation

public void registerValidation(ObjectInputValidation obj,
                               int prio)
                        throws IllegalStateException
May not be invoked in this context.

Overrides:
registerValidation in class ObjectInputStream
Parameters:
obj - ignored
prio - ignored
Throws:
IllegalStateException - always

JBoss Marshalling 1.3.0.CR9

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