Java Code Examples for com.sun.corba.se.impl.encoding.CDROutputStream

The following are top voted examples for showing how to use com.sun.corba.se.impl.encoding.CDROutputStream. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 2
Project: OpenJSharp   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 3
Project: openjdk-jdk10   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 4
Project: openjdk-jdk10   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 5
Project: openjdk9   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 6
Project: openjdk9   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 7
Project: lookaside_java-1.8.0-openjdk   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 8
Project: lookaside_java-1.8.0-openjdk   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 9
Project: jdk8u_corba   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 10
Project: jdk8u_corba   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 11
Project: infobip-open-jdk-8   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 12
Project: infobip-open-jdk-8   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 13
Project: openjdk-source-code-learn   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 14
Project: openjdk-source-code-learn   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS = new EncapsOutputStream( (ORB)os.orb(),
        ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 15
Project: OLD-OpenJDK8   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 16
Project: OLD-OpenJDK8   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 17
Project: openjdk-orb   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 18
Project: openjdk-orb   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 19
Project: openjdk-icedtea7   File: ReplyMessage_1_2.java   Source Code and License 6 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_long(this.reply_status);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);

}
 
Example 20
Project: openjdk-icedtea7   File: IIOPProfileTemplateImpl.java   Source Code and License 6 votes vote down vote up
public void write( ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
{
    giopVersion.write( os ) ;
    primary.write( os ) ;

    // Note that this is NOT an encapsulation: do not marshal
    // the endianness flag.  However, the length is required.
    // Note that this cannot be accomplished with a codec!

    // Use the byte order of the given stream
    OutputStream encapsulatedOS =
        sun.corba.OutputStreamFactory.newEncapsOutputStream(
            (ORB)os.orb(), ((CDROutputStream)os).isLittleEndian() ) ;

    okeyTemplate.write( id, encapsulatedOS ) ;
    EncapsulationUtility.writeOutputStream( encapsulatedOS, os ) ;

    if (giopVersion.getMinor() > 0)
        EncapsulationUtility.writeIdentifiableSequence( this, os ) ;
}
 
Example 21
Project: OpenJSharp   File: TypeCodeImpl.java   Source Code and License 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example 22
Project: OpenJSharp   File: RequestMessage_1_2.java   Source Code and License 5 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_octet(this.response_flags);
    nullCheck(this.reserved);
    if (this.reserved.length != (3)) {
        throw wrapper.badReservedLength(
            org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }
    for (int _i0 = 0;_i0 < (3); ++_i0) {
        ostream.write_octet(this.reserved[_i0]);
    }
    nullCheck(this.target);
    TargetAddressHelper.write(ostream, this.target);
    ostream.write_string(this.operation);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);
}
 
Example 23
Project: OpenJSharp   File: TypeCodeOutputStream.java   Source Code and License 5 votes vote down vote up
public static TypeCodeOutputStream wrapOutputStream(OutputStream os) {
    boolean littleEndian = ((os instanceof CDROutputStream) ? ((CDROutputStream)os).isLittleEndian() : false);
    TypeCodeOutputStream tos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream((ORB)os.orb(), littleEndian);
    tos.setEnclosingOutputStream(os);
    //if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + tos + " with parent " + os);
    return tos;
}
 
Example 24
Project: OpenJSharp   File: EncapsulationUtility.java   Source Code and License 5 votes vote down vote up
/** Helper method that is used to extract data from an output
* stream and write the data to another output stream.  Defined
* as static so that it can be used in another class.
*/
static public void writeOutputStream( OutputStream dataStream,
    OutputStream os )
{
    byte[] data = ((CDROutputStream)dataStream).toByteArray() ;
    os.write_long( data.length ) ;
    os.write_octet_array( data, 0, data.length ) ;
}
 
Example 25
Project: openjdk-jdk10   File: TypeCodeImpl.java   Source Code and License 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example 26
Project: openjdk-jdk10   File: RequestMessage_1_2.java   Source Code and License 5 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_octet(this.response_flags);
    nullCheck(this.reserved);
    if (this.reserved.length != (3)) {
        throw wrapper.badReservedLength(
            org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }
    for (int _i0 = 0;_i0 < (3); ++_i0) {
        ostream.write_octet(this.reserved[_i0]);
    }
    nullCheck(this.target);
    TargetAddressHelper.write(ostream, this.target);
    ostream.write_string(this.operation);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);
}
 
Example 27
Project: openjdk-jdk10   File: TypeCodeOutputStream.java   Source Code and License 5 votes vote down vote up
public static TypeCodeOutputStream wrapOutputStream(OutputStream os) {
    boolean littleEndian = ((os instanceof CDROutputStream) ? ((CDROutputStream)os).isLittleEndian() : false);
    TypeCodeOutputStream tos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream((ORB)os.orb(), littleEndian);
    tos.setEnclosingOutputStream(os);
    //if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + tos + " with parent " + os);
    return tos;
}
 
Example 28
Project: openjdk-jdk10   File: EncapsulationUtility.java   Source Code and License 5 votes vote down vote up
/** Helper method that is used to extract data from an output
* stream and write the data to another output stream.  Defined
* as static so that it can be used in another class.
*/
static public void writeOutputStream( OutputStream dataStream,
    OutputStream os )
{
    byte[] data = ((CDROutputStream)dataStream).toByteArray() ;
    os.write_long( data.length ) ;
    os.write_octet_array( data, 0, data.length ) ;
}
 
Example 29
Project: openjdk9   File: TypeCodeImpl.java   Source Code and License 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example 30
Project: openjdk9   File: RequestMessage_1_2.java   Source Code and License 5 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_octet(this.response_flags);
    nullCheck(this.reserved);
    if (this.reserved.length != (3)) {
        throw wrapper.badReservedLength(
            org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }
    for (int _i0 = 0;_i0 < (3); ++_i0) {
        ostream.write_octet(this.reserved[_i0]);
    }
    nullCheck(this.target);
    TargetAddressHelper.write(ostream, this.target);
    ostream.write_string(this.operation);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);
}
 
Example 31
Project: openjdk9   File: TypeCodeOutputStream.java   Source Code and License 5 votes vote down vote up
public static TypeCodeOutputStream wrapOutputStream(OutputStream os) {
    boolean littleEndian = ((os instanceof CDROutputStream) ? ((CDROutputStream)os).isLittleEndian() : false);
    TypeCodeOutputStream tos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream((ORB)os.orb(), littleEndian);
    tos.setEnclosingOutputStream(os);
    //if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + tos + " with parent " + os);
    return tos;
}
 
Example 32
Project: openjdk9   File: EncapsulationUtility.java   Source Code and License 5 votes vote down vote up
/** Helper method that is used to extract data from an output
* stream and write the data to another output stream.  Defined
* as static so that it can be used in another class.
*/
static public void writeOutputStream( OutputStream dataStream,
    OutputStream os )
{
    byte[] data = ((CDROutputStream)dataStream).toByteArray() ;
    os.write_long( data.length ) ;
    os.write_octet_array( data, 0, data.length ) ;
}
 
Example 33
Project: lookaside_java-1.8.0-openjdk   File: TypeCodeImpl.java   Source Code and License 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example 34
Project: lookaside_java-1.8.0-openjdk   File: RequestMessage_1_2.java   Source Code and License 5 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_octet(this.response_flags);
    nullCheck(this.reserved);
    if (this.reserved.length != (3)) {
        throw wrapper.badReservedLength(
            org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }
    for (int _i0 = 0;_i0 < (3); ++_i0) {
        ostream.write_octet(this.reserved[_i0]);
    }
    nullCheck(this.target);
    TargetAddressHelper.write(ostream, this.target);
    ostream.write_string(this.operation);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);
}
 
Example 35
Project: lookaside_java-1.8.0-openjdk   File: TypeCodeOutputStream.java   Source Code and License 5 votes vote down vote up
public static TypeCodeOutputStream wrapOutputStream(OutputStream os) {
    boolean littleEndian = ((os instanceof CDROutputStream) ? ((CDROutputStream)os).isLittleEndian() : false);
    TypeCodeOutputStream tos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream((ORB)os.orb(), littleEndian);
    tos.setEnclosingOutputStream(os);
    //if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + tos + " with parent " + os);
    return tos;
}
 
Example 36
Project: lookaside_java-1.8.0-openjdk   File: EncapsulationUtility.java   Source Code and License 5 votes vote down vote up
/** Helper method that is used to extract data from an output
* stream and write the data to another output stream.  Defined
* as static so that it can be used in another class.
*/
static public void writeOutputStream( OutputStream dataStream,
    OutputStream os )
{
    byte[] data = ((CDROutputStream)dataStream).toByteArray() ;
    os.write_long( data.length ) ;
    os.write_octet_array( data, 0, data.length ) ;
}
 
Example 37
Project: jdk8u_corba   File: TypeCodeImpl.java   Source Code and License 5 votes vote down vote up
public static CDROutputStream newOutputStream(ORB orb) {
    TypeCodeOutputStream tcos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream(orb);
    //if (debug) System.out.println("Created TypeCodeOutputStream " + tcos +
    // " with no parent");
    return tcos;
}
 
Example 38
Project: jdk8u_corba   File: RequestMessage_1_2.java   Source Code and License 5 votes vote down vote up
public void write(org.omg.CORBA.portable.OutputStream ostream) {
    super.write(ostream);
    ostream.write_ulong(this.request_id);
    ostream.write_octet(this.response_flags);
    nullCheck(this.reserved);
    if (this.reserved.length != (3)) {
        throw wrapper.badReservedLength(
            org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }
    for (int _i0 = 0;_i0 < (3); ++_i0) {
        ostream.write_octet(this.reserved[_i0]);
    }
    nullCheck(this.target);
    TargetAddressHelper.write(ostream, this.target);
    ostream.write_string(this.operation);
    if (this.service_contexts != null) {
            service_contexts.write(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream,
            GIOPVersion.V1_2);
        } else {
            ServiceContexts.writeNullServiceContext(
            (org.omg.CORBA_2_3.portable.OutputStream) ostream);
    }

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first write operation called from the stub code,
    // during body construction, would insert a header padding, such that
    // the body is aligned on an 8-octet boundary.
    ((CDROutputStream)ostream).setHeaderPadding(true);
}
 
Example 39
Project: jdk8u_corba   File: TypeCodeOutputStream.java   Source Code and License 5 votes vote down vote up
public static TypeCodeOutputStream wrapOutputStream(OutputStream os) {
    boolean littleEndian = ((os instanceof CDROutputStream) ? ((CDROutputStream)os).isLittleEndian() : false);
    TypeCodeOutputStream tos =
        sun.corba.OutputStreamFactory.newTypeCodeOutputStream((ORB)os.orb(), littleEndian);
    tos.setEnclosingOutputStream(os);
    //if (TypeCodeImpl.debug) System.out.println("Created TypeCodeOutputStream " + tos + " with parent " + os);
    return tos;
}
 
Example 40
Project: jdk8u_corba   File: EncapsulationUtility.java   Source Code and License 5 votes vote down vote up
/** Helper method that is used to extract data from an output
* stream and write the data to another output stream.  Defined
* as static so that it can be used in another class.
*/
static public void writeOutputStream( OutputStream dataStream,
    OutputStream os )
{
    byte[] data = ((CDROutputStream)dataStream).toByteArray() ;
    os.write_long( data.length ) ;
    os.write_octet_array( data, 0, data.length ) ;
}