public Any read_any() { Any any = orb.create_any(); TypeCodeImpl tc = new TypeCodeImpl(orb); // read off the typecode // REVISIT We could avoid this try-catch if we could peek the typecode // kind off this stream and see if it is a tk_value. Looking at the // code we know that for tk_value the Any.read_value() below // ignores the tc argument anyway (except for the kind field). // But still we would need to make sure that the whole typecode, // including encapsulations, is read off. try { tc.read_value(parent); } catch (MARSHAL ex) { if (tc.kind().value() != TCKind._tk_value) throw ex; // We can be sure that the whole typecode encapsulation has been // read off. dprintThrowable(ex); } // read off the value of the any any.read_value(parent, tc); return any; }
/** * Finds and returns a value factory for the given repository ID. * The value factory returned was previously registered by a call to * {@link #register_value_factory} or is the default factory. * * @param repositoryID the repository ID. * @return the value factory. * @exception org.omg.CORBA.BAD_PARAM if unable to locate a factory. **/ public synchronized ValueFactory lookup_value_factory(String repositoryID) { checkShutdownState(); ValueFactory factory = (ValueFactory)valueFactoryCache.get(repositoryID); if (factory == null) { try { factory = Utility.getFactory(null, null, null, repositoryID); } catch(org.omg.CORBA.MARSHAL ex) { throw wrapper.unableFindValueFactory( ex ) ; } } return factory ; }
public final void readFully(byte data[], int offset, int size) throws IOException{ // d11623 : implement readFully, required for serializing some core classes try{ readObjectState.readData(this); orbStream.read_octet_array(data, offset, size); } catch (MARSHAL marshalException) { handleOptionalDataMarshalException(marshalException, false); throw marshalException; } catch(Error e) { IOException exc = new IOException(e.getMessage()); exc.initCause(e); throw exc ; } }
public final int read() throws IOException{ try{ readObjectState.readData(this); return (orbStream.read_octet() << 0) & 0x000000FF; } catch (MARSHAL marshalException) { if (marshalException.minor == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) { setState(IN_READ_OBJECT_NO_MORE_OPT_DATA); return -1; } throw marshalException; } catch(Error e) { IOException exc = new IOException(e.getMessage()); exc.initCause(e) ; throw exc ; } }
public MARSHAL cannotMarshalBadTckind( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( CANNOT_MARSHAL_BAD_TCKIND, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.cannotMarshalBadTckind", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public final boolean readBoolean() throws IOException{ try{ readObjectState.readData(this); return orbStream.read_boolean(); } catch (MARSHAL marshalException) { handleOptionalDataMarshalException(marshalException, false); throw marshalException; } catch(Error e) { IOException exc = new IOException(e.getMessage()); exc.initCause(e); throw exc ; } }
public MARSHAL unableLocateValueFactory( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( UNABLE_LOCATE_VALUE_FACTORY, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.FINE )) { Object[] parameters = null ; doLog( Level.FINE, "OMG.unableLocateValueFactory", parameters, OMGSystemException.class, exc ) ; } return exc ; }
public final int readInt() throws IOException{ try{ readObjectState.readData(this); return orbStream.read_long(); } catch (MARSHAL marshalException) { handleOptionalDataMarshalException(marshalException, false); throw marshalException; } catch(Error e) { IOException exc = new IOException(e.getMessage()); exc.initCause(e); throw exc ; } }
public MARSHAL unsupportedFormatVersion( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( UNSUPPORTED_FORMAT_VERSION, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "OMG.unsupportedFormatVersion", parameters, OMGSystemException.class, exc ) ; } return exc ; }
public MARSHAL unableLocateValueHelper( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( UNABLE_LOCATE_VALUE_HELPER, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "UTIL.unableLocateValueHelper", parameters, UtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL couldNotSkipBytes( CompletionStatus cs, Throwable t, Object arg0, Object arg1) { MARSHAL exc = new MARSHAL( COULD_NOT_SKIP_BYTES, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = new Object[2] ; parameters[0] = arg0 ; parameters[1] = arg1 ; doLog( Level.WARNING, "ORBUTIL.couldNotSkipBytes", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL indirectionNotFound( CompletionStatus cs, Throwable t, Object arg0) { MARSHAL exc = new MARSHAL( INDIRECTION_NOT_FOUND, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.FINE )) { Object[] parameters = new Object[1] ; parameters[0] = arg0 ; doLog( Level.FINE, "ORBUTIL.indirectionNotFound", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL characterOutofrange( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( CHARACTER_OUTOFRANGE, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.characterOutofrange", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL wcharBadGiopVersionSent( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( WCHAR_BAD_GIOP_VERSION_SENT, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "OMG.wcharBadGiopVersionSent", parameters, OMGSystemException.class, exc ) ; } return exc ; }
public MARSHAL refTypeIndirType( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( REF_TYPE_INDIR_TYPE, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.refTypeIndirType", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL dsiResultException( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( DSI_RESULT_EXCEPTION, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.dsiResultException", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL iiopinputstreamGrow( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( IIOPINPUTSTREAM_GROW, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.iiopinputstreamGrow", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL invalidIndirection( CompletionStatus cs, Throwable t, Object arg0) { MARSHAL exc = new MARSHAL( INVALID_INDIRECTION, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = new Object[1] ; parameters[0] = arg0 ; doLog( Level.WARNING, "ORBUTIL.invalidIndirection", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL badReservedLength( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( BAD_RESERVED_LENGTH, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.badReservedLength", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL malformedUrl( CompletionStatus cs, Throwable t, Object arg0, Object arg1) { MARSHAL exc = new MARSHAL( MALFORMED_URL, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = new Object[2] ; parameters[0] = arg0 ; parameters[1] = arg1 ; doLog( Level.WARNING, "ORBUTIL.malformedUrl", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL valuehandlerReadError( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( VALUEHANDLER_READ_ERROR, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.valuehandlerReadError", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
/** Creates an ObjectKeyTemplate from the InputStream. Most of the * decoding is done inside the handler. */ private ObjectKeyTemplate create( InputStream is, Handler handler, OctetSeqHolder osh ) { ObjectKeyTemplate oktemp = null ; try { is.mark(0) ; int magic = is.read_long() ; if (validMagic( magic )) { int scid = is.read_long() ; oktemp = handler.handle( magic, scid, is, osh ) ; } } catch (MARSHAL mexc) { // XXX log this error // ignore this: error handled below because oktemp == null } if (oktemp == null) // If we did not successfully construct a oktemp, reset the // stream so that WireObjectKeyTemplate can correctly construct the // object key. try { is.reset() ; } catch (IOException exc) { // XXX log this error // ignore this } return oktemp ; }
public MARSHAL valuehandlerReadException( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( VALUEHANDLER_READ_EXCEPTION, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.valuehandlerReadException", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL notAnObjectImpl( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( NOT_AN_OBJECT_IMPL, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "OMG.notAnObjectImpl", parameters, OMGSystemException.class, exc ) ; } return exc ; }
public MARSHAL unableToLocateRepIdArray( CompletionStatus cs, Throwable t, Object arg0) { MARSHAL exc = new MARSHAL( UNABLE_TO_LOCATE_REP_ID_ARRAY, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = new Object[1] ; parameters[0] = arg0 ; doLog( Level.WARNING, "ORBUTIL.unableToLocateRepIdArray", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL customWrapperNotSingleRepid( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( CUSTOM_WRAPPER_NOT_SINGLE_REPID, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.customWrapperNotSingleRepid", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL invalidComplexTypecode( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( INVALID_COMPLEX_TYPECODE, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.invalidComplexTypecode", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public final short readShort() throws IOException{ try{ readObjectState.readData(this); return orbStream.read_short(); } catch (MARSHAL marshalException) { handleOptionalDataMarshalException(marshalException, false); throw marshalException; } catch(Error e) { IOException exc = new IOException(e.getMessage()); exc.initCause(e); throw exc ; } }
public MARSHAL wcharDataInGiop10( CompletionStatus cs, Throwable t ) { MARSHAL exc = new MARSHAL( WCHAR_DATA_IN_GIOP_1_0, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = null ; doLog( Level.WARNING, "ORBUTIL.wcharDataInGiop10", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public final float readFloat() throws IOException{ try{ readObjectState.readData(this); return orbStream.read_float(); } catch (MARSHAL marshalException) { handleOptionalDataMarshalException(marshalException, false); throw marshalException; } catch(Error e) { IOException exc = new IOException(e.getMessage()); exc.initCause(e); throw exc ; } }
public MARSHAL badValueTag( CompletionStatus cs, Throwable t, Object arg0) { MARSHAL exc = new MARSHAL( BAD_VALUE_TAG, cs ) ; if (t != null) exc.initCause( t ) ; if (logger.isLoggable( Level.WARNING )) { Object[] parameters = new Object[1] ; parameters[0] = arg0 ; doLog( Level.WARNING, "ORBUTIL.badValueTag", parameters, ORBUtilSystemException.class, exc ) ; } return exc ; }
public MARSHAL badInsertobjParam( CompletionStatus cs, Object arg0) { return badInsertobjParam( cs, null, arg0 ) ; }
/** * Override the actions of the final method "readObject()" * in ObjectInputStream. * @since JDK1.1.6 * * Read an object from the ObjectInputStream. * The class of the object, the signature of the class, and the values * of the non-transient and non-static fields of the class and all * of its supertypes are read. Default deserializing for a class can be * overriden using the writeObject and readObject methods. * Objects referenced by this object are read transitively so * that a complete equivalent graph of objects is reconstructed by readObject. <p> * * The root object is completly restored when all of its fields * and the objects it references are completely restored. At this * point the object validation callbacks are executed in order * based on their registered priorities. The callbacks are * registered by objects (in the readObject special methods) * as they are individually restored. * * Exceptions are thrown for problems with the InputStream and for classes * that should not be deserialized. All exceptions are fatal to the * InputStream and leave it in an indeterminate state; it is up to the caller * to ignore or recover the stream state. * @exception java.lang.ClassNotFoundException Class of a serialized object * cannot be found. * @exception InvalidClassException Something is wrong with a class used by * serialization. * @exception StreamCorruptedException Control information in the * stream is inconsistent. * @exception OptionalDataException Primitive data was found in the * stream instead of objects. * @exception IOException Any of the usual Input/Output related exceptions. * @since JDK1.1 */ public final synchronized Object readObjectDelegate() throws IOException { try { readObjectState.readData(this); return orbStream.read_abstract_interface(); } catch (MARSHAL marshalException) { handleOptionalDataMarshalException(marshalException, true); throw marshalException; } catch(IndirectionException cdrie) { // The CDR stream had never seen the given offset before, // so check the recursion manager (it will throw an // IOException if it doesn't have a reference, either). return activeRecursionMgr.getObject(cdrie.offset); } }
public MARSHAL invalidTypecodeKindMarshal( CompletionStatus cs ) { return invalidTypecodeKindMarshal( cs, null ) ; }
public MARSHAL badValueTag( Throwable t, Object arg0) { return badValueTag( CompletionStatus.COMPLETED_NO, t, arg0 ) ; }
public MARSHAL wcharBadGiopVersionReturned( Throwable t ) { return wcharBadGiopVersionReturned( CompletionStatus.COMPLETED_NO, t ) ; }
public MARSHAL unableLocateValueFactory( Throwable t ) { return unableLocateValueFactory( CompletionStatus.COMPLETED_NO, t ) ; }
public MARSHAL badChunkLength( CompletionStatus cs, Object arg0, Object arg1) { return badChunkLength( cs, null, arg0, arg1 ) ; }