当前位置: 首页>>代码示例>>Java>>正文


Java CDROutputStream类代码示例

本文整理汇总了Java中com.sun.corba.se.impl.encoding.CDROutputStream的典型用法代码示例。如果您正苦于以下问题:Java CDROutputStream类的具体用法?Java CDROutputStream怎么用?Java CDROutputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CDROutputStream类属于com.sun.corba.se.impl.encoding包,在下文中一共展示了CDROutputStream类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: write

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
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);

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:ReplyMessage_1_2.java

示例2: write

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
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 ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:IIOPProfileTemplateImpl.java

示例3: write

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
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 ) ;
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:20,代码来源:IIOPProfileTemplateImpl.java

示例4: newOutputStream

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:TypeCodeImpl.java

示例5: write

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:RequestMessage_1_2.java

示例6: wrapOutputStream

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:TypeCodeOutputStream.java

示例7: writeOutputStream

import com.sun.corba.se.impl.encoding.CDROutputStream; //导入依赖的package包/类
/** 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 ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:EncapsulationUtility.java


注:本文中的com.sun.corba.se.impl.encoding.CDROutputStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。