FileDocCategorySizeDatePackage
InputStreamHook.javaAPI DocJava SE 5 API16022Fri Aug 26 14:54:22 BST 2005com.sun.corba.se.impl.io

InputStreamHook

public abstract class InputStreamHook extends ObjectInputStream

Fields Summary
static final com.sun.corba.se.impl.logging.OMGSystemException
omgWrapper
static final com.sun.corba.se.impl.logging.UtilSystemException
utilWrapper
protected ReadObjectState
readObjectState
protected static final ReadObjectState
DEFAULT_STATE
protected static final ReadObjectState
IN_READ_OBJECT_OPT_DATA
protected static final ReadObjectState
IN_READ_OBJECT_NO_MORE_OPT_DATA
protected static final ReadObjectState
IN_READ_OBJECT_DEFAULTS_SENT
protected static final ReadObjectState
NO_READ_OBJECT_DEFAULTS_SENT
protected static final ReadObjectState
IN_READ_OBJECT_REMOTE_NOT_CUSTOM_MARSHALED
protected static final ReadObjectState
IN_READ_OBJECT_PAST_DEFAULTS_REMOTE_NOT_CUSTOM
Constructors Summary
public InputStreamHook()

	super();
    
Methods Summary
public voiddefaultReadObject()

        readObjectState.beginDefaultReadObject(this);

    	defaultReadObjectDelegate();

        readObjectState.endDefaultReadObject(this);
    
public abstract voiddefaultReadObjectDelegate()

protected abstract org.omg.CORBA_2_3.portable.InputStreamgetOrbStream()

protected abstract bytegetStreamFormatVersion()

abstract voidreadFields(java.util.Map fieldToValueMap)

public java.io.ObjectInputStream$GetFieldreadFields()


        HashMap fieldValueMap = new HashMap();

        // We were treating readFields same as defaultReadObject. It is
        // incorrect if the state is readOptionalData. If this line
        // is uncommented, it will throw a stream corrupted exception.
        // _REVISIT_: The ideal fix would be to add a new state. In 
        // writeObject user may do one of the following
        // 1. Call defaultWriteObject() 
        // 2. Put out optional fields 
        // 3. Call writeFields 
        // We have the state defined for (1) and (2) but not for (3), so
        // we should ideally introduce a new state for 3 and have the
        // beginDefaultReadObject do nothing.
        //readObjectState.beginDefaultReadObject(this);

        readFields(fieldValueMap);

        readObjectState.endDefaultReadObject(this);

	return new HookGetFields(fieldValueMap);
    
protected voidsetState(com.sun.corba.se.impl.io.InputStreamHook$ReadObjectState newState)

        readObjectState = newState;
    
protected voidthrowOptionalDataIncompatibleException()

	throw omgWrapper.rmiiiopOptionalDataIncompatible2() ;