Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.InputStream


    protected boolean initializeComponentsFromAny() {
        // This typeCode is of kind tk_sequence.
        TypeCode typeCode = any.type();
        int length;
        TypeCode contentType = getContentType();
        InputStream input;

        try {
            input = any.create_input_stream();
        } catch (BAD_OPERATION e) {
            return false;
        }

        length = input.read_long();
        components = new DynAny[length];
        anys = new Any[length];

        for (int i=0; i<length; i++) {
            // _REVISIT_ Could use read_xxx_array() methods on InputStream for efficiency
View Full Code Here


        any.read_value(out.create_input_stream(),
            getSystemExceptionTypeCode(orb, repID, name));
    }

    public static SystemException extractSystemException(Any any) {
        InputStream in = any.create_input_stream();
        ORB orb = (ORB)(in.orb());
        if ( ! isSystemExceptionTypeCode(any.type(), orb)) {
            throw wrapper.unknownDsiSysex(CompletionStatus.COMPLETED_MAYBE);
        }
        return ORBUtility.readSystemException(in);
    }
View Full Code Here

        try {
            length = typeCode.member_count();
        } catch (BadKind badKind) { // impossible
        }

        InputStream input = any.create_input_stream();

        allocComponents(length);

        for (int i=0; i<length; i++) {
            try {
View Full Code Here

        super(orb, typeCode);
    }

    protected boolean initializeComponentsFromAny() {
        try {
            InputStream input = any.create_input_stream();
            Any discriminatorAny = DynAnyUtil.extractAnyFromStream(discriminatorType(), input, orb);
            discriminator = DynAnyUtil.createMostDerivedDynAny(discriminatorAny, orb, false);
            currentMemberIndex = currentUnionMemberIndex(discriminatorAny);
            Any memberAny = DynAnyUtil.extractAnyFromStream(memberType(currentMemberIndex), input, orb);
            currentMember = DynAnyUtil.createMostDerivedDynAny(memberAny, orb, false);
View Full Code Here

    protected boolean initializeComponentsFromAny() {
        // This typeCode is of kind tk_array.
        TypeCode typeCode = any.type();
        int length = getBound();
        TypeCode contentType = getContentType();
        InputStream input;

        try {
            input = any.create_input_stream();
        } catch (BAD_OPERATION e) {
            return false;
View Full Code Here

    {
        boolean remarshal = true;

        // Invoke.

        InputStream inStream = null;

        // If there is a location forward then you will need
        // to invoke again on the updated information.
        // Just calling this same routine with the same host/port
        // does not take the location forward info into account.
View Full Code Here

        return inStream;
    }

    public org.omg.CORBA.Object resolve( String identifier )
    {
        InputStream inStream = null ;
        org.omg.CORBA.Object result = null ;

        try {
            inStream = invoke( "get", identifier ) ;

            result = inStream.read_Object();

            // NOTE: do note trap and ignore errors.
            // Let them flow out.
        } finally {
            bootstrapDelegate.releaseReply( null, inStream ) ;
View Full Code Here

        return result ;
    }

    public java.util.Set list()
    {
        InputStream inStream = null ;
        java.util.Set result = new java.util.HashSet() ;

        try {
            inStream = invoke( "list", null ) ;

            int count = inStream.read_long();
            for (int i=0; i < count; i++)
                result.add( inStream.read_string() ) ;

            // NOTE: do note trap and ignore errors.
            // Let them flow out.
        } finally {
            bootstrapDelegate.releaseReply( null, inStream ) ;
View Full Code Here

    public StubIORImpl( org.omg.CORBA.Object obj )
    {
        // write the IOR to an OutputStream and get an InputStream
        OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream();
        ostr.write_Object(obj);
        InputStream istr = ostr.create_input_stream();

        // read the IOR components back from the stream
        int typeLength = istr.read_long();
        typeData = new byte[typeLength];
        istr.read_octet_array(typeData, 0, typeLength);
        int numProfiles = istr.read_long();
        profileTags = new int[numProfiles];
        profileData = new byte[numProfiles][];
        for (int i = 0; i < numProfiles; i++) {
            profileTags[i] = istr.read_long();
            profileData[i] = new byte[istr.read_long()];
            istr.read_octet_array(profileData[i], 0, profileData[i].length);
        }
    }
View Full Code Here

            ostr.write_long(profileTags[i]);
            ostr.write_long(profileData[i].length);
            ostr.write_octet_array(profileData[i], 0, profileData[i].length);
        }

        InputStream istr = ostr.create_input_stream() ;

        // read the IOR back from the stream
        org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
        return StubAdapter.getDelegate( obj ) ;
    }
View Full Code Here

TOP

Related Classes of org.omg.CORBA.portable.InputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.