uka.transport
Class UnmarshalStream

java.lang.Object
  extended byjava.io.InputStream
      extended byuka.transport.BinaryInputStream
          extended byuka.transport.UnmarshalStream
All Implemented Interfaces:
java.io.DataInput, java.io.ObjectInput, TransportConstants

public class UnmarshalStream
extends BinaryInputStream
implements TransportConstants, java.io.ObjectInput

Author:
Bernhard Haumacher

Nested Class Summary
 class UnmarshalStream.Bridge
           
 
Field Summary
private static java.lang.Class[] classArg
           
(package private)  boolean enableResolve
           
protected  UnmarshalStream.Bridge iin
           
protected  boolean iin_init
           
protected  boolean iin_used
           
(package private)  java.io.DataInputStream lazy_din
           
(package private)  IntQueue objectReferences
           
protected  ObjectSpace objectSpace
           
(package private)  java.util.Stack restoreStack
           
private  java.lang.Object[] thisArg
           
protected  EnlargingArray wireConstrTable
           
 
Fields inherited from class uka.transport.BinaryInputStream
buf, bufcnt, buflen, cbuffer, in
 
Fields inherited from class java.io.InputStream
 
Fields inherited from interface uka.transport.TransportConstants
REQUEST_MAX, REQUEST_MAX_boolean, REQUEST_MAX_byte, REQUEST_MAX_char, REQUEST_MAX_double, REQUEST_MAX_float, REQUEST_MAX_int, REQUEST_MAX_long, REQUEST_MAX_short, SIZEOF_boolean, SIZEOF_byte, SIZEOF_char, SIZEOF_double, SIZEOF_float, SIZEOF_int, SIZEOF_long, SIZEOF_short, TC_ANONYMOUS, TC_DEFAULT, TC_EXCEPTION, TC_NEW, TC_NULL, TC_REFERENCE, TC_REPLACEMENT, TC_RESET, TC_RESETTYPE, TC_TYPE, TC_USER
 
Constructor Summary
  UnmarshalStream(java.io.InputStream in)
           
protected UnmarshalStream(java.io.InputStream in, ObjectSpace objectSpace, EnlargingArray wireConstrTable)
           
 
Method Summary
protected  boolean enableResolveObject(boolean enable)
           
private  java.io.DataInputStream getDataInputStream()
           
private  java.lang.reflect.Constructor readConstructor()
           
private  java.lang.Class readDescriptor()
           
 java.lang.String readLine()
          Deprecated.  
 java.lang.Object readObject()
           
 java.lang.Object readReference()
           
protected  void readStreamHeader()
           
 java.lang.String readUTF()
           
 void register(java.lang.Object obj, int id)
          Registers the provided object with the objectSpace of this stream.
protected  java.lang.Object resolveObject(java.lang.Object obj)
           
 ObjectSpace setObjectSpace(ObjectSpace objectSpace)
           
 void symmetricReset()
           
 void symmetricResetType()
           
 
Methods inherited from class uka.transport.BinaryInputStream
accept, available, close, getBuffer, getPosition, read, read, read, readBoolean, readByte, readChar, readChars, readDouble, readFloat, readFully, readFully, readHugeBooleanArray, readHugeByteArray, readHugeCharArray, readHugeDoubleArray, readHugeFloatArray, readHugeIntArray, readHugeLongArray, readHugeShortArray, readInt, readLong, readShort, readUnsignedByte, readUnsignedShort, request, requestTest, skip, skipBytes
 
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
 
Methods inherited from interface java.io.ObjectInput
available, close, read, read, read, skip
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLong, readShort, readUnsignedByte, readUnsignedShort, skipBytes
 

Field Detail

iin

protected UnmarshalStream.Bridge iin

iin_init

protected boolean iin_init

iin_used

protected boolean iin_used

objectSpace

protected ObjectSpace objectSpace

wireConstrTable

protected final EnlargingArray wireConstrTable

objectReferences

IntQueue objectReferences

restoreStack

java.util.Stack restoreStack

thisArg

private final java.lang.Object[] thisArg

classArg

private static final java.lang.Class[] classArg

enableResolve

boolean enableResolve

lazy_din

java.io.DataInputStream lazy_din
Constructor Detail

UnmarshalStream

public UnmarshalStream(java.io.InputStream in)
                throws java.io.IOException

UnmarshalStream

protected UnmarshalStream(java.io.InputStream in,
                          ObjectSpace objectSpace,
                          EnlargingArray wireConstrTable)
                   throws java.io.IOException
Method Detail

setObjectSpace

public ObjectSpace setObjectSpace(ObjectSpace objectSpace)
See Also:
MarshalStream.setObjectSpace(ObjectSpace)

symmetricReset

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

symmetricResetType

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

readObject

public final java.lang.Object readObject()
                                  throws java.lang.ClassNotFoundException,
                                         java.io.IOException
Specified by:
readObject in interface java.io.ObjectInput
Throws:
java.lang.ClassNotFoundException
java.io.IOException

readReference

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

readDescriptor

private java.lang.Class readDescriptor()
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

readConstructor

private java.lang.reflect.Constructor readConstructor()
                                               throws java.io.IOException,
                                                      java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

register

public void register(java.lang.Object obj,
                     int id)
Registers the provided object with the objectSpace of this stream. This method is called from TransportDescriptor.unmarshalReference(uka.transport.UnmarshalStream, int) after creating a new object and before unmarshaling any references to other objects.


resolveObject

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

readStreamHeader

protected void readStreamHeader()
                         throws java.io.IOException,
                                java.io.StreamCorruptedException
Throws:
java.io.IOException
java.io.StreamCorruptedException

enableResolveObject

protected boolean enableResolveObject(boolean enable)
                               throws java.lang.SecurityException
Throws:
java.lang.SecurityException

getDataInputStream

private final java.io.DataInputStream getDataInputStream()

readUTF

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

readLine

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

Specified by:
readLine in interface java.io.DataInput
Overrides:
readLine in class BinaryInputStream
Throws:
java.io.IOException