JBoss Marshalling 1.3.0.GA

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:
java.io.Closeable, java.io.DataInput, java.io.ObjectInput, java.io.ObjectStreamConstants

public final class UnmarshallingObjectInputStream
extends java.io.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
java.io.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, java.io.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  java.io.ObjectStreamClass readClassDescriptor()
          
 double readDouble()
           
 java.io.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()
           
 java.lang.String readLine()
          Deprecated. 
 long readLong()
           
protected  java.lang.Object readObjectOverride()
           
 java.lang.Object readObjectUnshared()
           
 short readShort()
           
protected  void readStreamHeader()
          
 java.lang.Object readUnshared()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void registerValidation(java.io.ObjectInputValidation obj, int prio)
          May not be invoked in this context.
protected  java.lang.Class<?> resolveClass(java.io.ObjectStreamClass desc)
          
protected  java.lang.Object resolveObject(java.lang.Object obj)
          
protected  java.lang.Class<?> resolveProxyClass(java.lang.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,
                                      java.io.InputStream stream)
                               throws java.io.IOException,
                                      java.lang.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:
java.io.IOException - if an I/O error occurs
java.lang.SecurityException - if the caller does not have permission to construct an instance of this class

UnmarshallingObjectInputStream

public UnmarshallingObjectInputStream(Unmarshaller unmarshaller,
                                      ByteInput byteInput)
                               throws java.io.IOException,
                                      java.lang.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:
java.io.IOException - if an I/O error occurs
java.lang.SecurityException - if the caller does not have permission to construct an instance of this class
Method Detail

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

readObjectOverride

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

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[] b)
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                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

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

available

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

close

public void close()
           throws java.io.IOException,
                  java.lang.IllegalStateException
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
java.lang.IllegalStateException

readFully

public void readFully(byte[] b)
               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[] b,
                      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 n)
              throws java.io.IOException
Specified by:
skipBytes in interface java.io.DataInput
Overrides:
skipBytes 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

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

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

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

readLine

@Deprecated
public java.lang.String readLine()
                          throws java.io.IOException
Deprecated. 

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

readObjectUnshared

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

resolveClass

protected final java.lang.Class<?> resolveClass(java.io.ObjectStreamClass desc)
                                         throws java.lang.IllegalStateException

Overrides:
resolveClass in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException

resolveProxyClass

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

Overrides:
resolveProxyClass in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException

resolveObject

protected final java.lang.Object resolveObject(java.lang.Object obj)
                                        throws java.lang.IllegalStateException

Overrides:
resolveObject in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException

enableResolveObject

protected final boolean enableResolveObject(boolean enable)
                                     throws java.lang.IllegalStateException

Overrides:
enableResolveObject in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException

readStreamHeader

protected final void readStreamHeader()
                               throws java.lang.IllegalStateException

Overrides:
readStreamHeader in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException

readClassDescriptor

protected final java.io.ObjectStreamClass readClassDescriptor()
                                                       throws java.lang.IllegalStateException

Overrides:
readClassDescriptor in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException

defaultReadObject

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

Overrides:
defaultReadObject in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException - always

readFields

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

Overrides:
readFields in class java.io.ObjectInputStream
Throws:
java.lang.IllegalStateException - always

registerValidation

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

Overrides:
registerValidation in class java.io.ObjectInputStream
Parameters:
obj - ignored
prio - ignored
Throws:
java.lang.IllegalStateException - always

JBoss Marshalling 1.3.0.GA

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