• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CDRInputStream类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ServiceContexts

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
/**
 * Read the Service contexts from the input stream.
 */
public ServiceContexts(InputStream s)
{
    this( (ORB)(s.orb()) ) ;

    // We need to store this so that we can have access
    // to the CodeBase for unmarshaling possible
    // RMI-IIOP valuetype data within an encapsulation.
    // (Known case: UnknownExceptionInfo)
    codeBase = ((CDRInputStream)s).getCodeBase();

    createMapFromInputStream(s);

    // Fix for bug 4904723
    giopVersion = ((CDRInputStream)s).getGIOPVersion();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:ServiceContexts.java


示例2: read_value

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:TypeCodeImpl.java


示例3: read

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // 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 read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

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


示例4: readEncapsulation

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb) {
    // _REVISIT_ Would be nice if we didn't have to copy the buffer!
    TypeCodeInputStream encap;

    int encapLength = is.read_long();

    // read off part of the buffer corresponding to the encapsulation
    byte[] encapBuffer = new byte[encapLength];
    is.read_octet_array(encapBuffer, 0, encapBuffer.length);

    // create an encapsulation using the marshal buffer
    if (is instanceof CDRInputStream) {
        encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length,
                                        ((CDRInputStream)is).isLittleEndian(),
                                        ((CDRInputStream)is).getGIOPVersion());
    } else {
        encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length);
    }
    encap.setEnclosingInputStream(is);
    encap.makeEncapsulation();
    //if (TypeCodeImpl.debug) {
        //System.out.println("Created TypeCodeInputStream " + encap + " with parent " + is);
        //encap.printBuffer();
    //}
    return encap;
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:27,代码来源:TypeCodeInputStream.java


示例5: read

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD
    if (this.reply_status == SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }

    } else if (this.reply_status == USER_EXCEPTION) {
        // do nothing. The client stub will read the exception from body.
    } else if (this.reply_status == LOCATION_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:ReplyMessage_1_0.java


示例6: read

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.locate_status = istream.read_long();
    isValidReplyStatus(this.locate_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.locate_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:LocateReplyMessage_1_0.java


示例7: read

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.reply_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:LocateReplyMessage_1_1.java


示例8: read

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD
    if (this.reply_status == SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if (this.reply_status == USER_EXCEPTION) {
        // do nothing. The client stub will read the exception from body.
    } else if (this.reply_status == LOCATION_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR(cdr) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:ReplyMessage_1_1.java


示例9: readEncapsulation

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb) {
    // _REVISIT_ Would be nice if we didn't have to copy the buffer!
    TypeCodeInputStream encap;

    int encapLength = is.read_long();

    // read off part of the buffer corresponding to the encapsulation
    byte[] encapBuffer = new byte[encapLength];
    is.read_octet_array(encapBuffer, 0, encapBuffer.length);

    // create an encapsulation using the marshal buffer
    if (is instanceof CDRInputStream) {
        encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
                encapBuffer, encapBuffer.length,
                ((CDRInputStream) is).isLittleEndian(),
                ((CDRInputStream) is).getGIOPVersion());
    } else {
        encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
                encapBuffer, encapBuffer.length);
    }
    encap.setEnclosingInputStream(is);
    encap.makeEncapsulation();
    //if (TypeCodeImpl.debug) {
        //System.out.println("Created TypeCodeInputStream " + encap + " with parent " + is);
        //encap.printBuffer();
    //}
    return encap;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:TypeCodeInputStream.java


示例10: getId

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
private byte[] getId( InputStream is )
{
    CDRInputStream cis = (CDRInputStream)is ;
    int len = cis.getBufferLength() ;
    byte[] result = new byte[ len ] ;
    cis.read_octet_array( result, 0, len ) ;
    return result ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:WireObjectKeyTemplate.java


示例11: OldJIDLObjectKeyTemplate

import com.sun.corba.se.impl.encoding.CDRInputStream; //导入依赖的package包/类
public OldJIDLObjectKeyTemplate( ORB orb, int magic, int scid,
    InputStream is, OctetSeqHolder osh )
{
    this( orb, magic, scid, is );

    osh.value = readObjectKey( is ) ;

    /**
     * Beginning with JDK 1.3.1_01, a byte was placed at the end of
     * the object key with a value indicating the patch version.
     * JDK 1.3.1_01 had the value 1.  If other patches are necessary
     * which involve ORB versioning changes, they should increment
     * the patch version.
     *
     * Note that if we see a value greater than 1 in this code, we
     * will treat it as if we're talking to the most recent ORB version.
     *
     * WARNING: This code is sensitive to changes in CDRInputStream
     * getPosition.  It assumes that the CDRInputStream is an
     * encapsulation whose position can be compared to the object
     * key array length.
     */
    if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW &&
        osh.value.length > ((CDRInputStream)is).getPosition()) {

        patchVersion = is.read_octet();

        if (patchVersion == ObjectKeyFactoryImpl.JDK1_3_1_01_PATCH_LEVEL)
            setORBVersion(ORBVersionFactory.getJDK1_3_1_01());
        else if (patchVersion > ObjectKeyFactoryImpl.JDK1_3_1_01_PATCH_LEVEL)
            setORBVersion(ORBVersionFactory.getORBVersion());
        else
            throw wrapper.invalidJdk131PatchLevel( new Integer( patchVersion ) ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:36,代码来源:OldJIDLObjectKeyTemplate.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BaiduMapOptions类代码示例发布时间:2022-05-22
下一篇:
Java Device类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap