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


Java InputStream.read_long方法代码示例

本文整理汇总了Java中org.omg.CORBA.portable.InputStream.read_long方法的典型用法代码示例。如果您正苦于以下问题:Java InputStream.read_long方法的具体用法?Java InputStream.read_long怎么用?Java InputStream.read_long使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.omg.CORBA.portable.InputStream的用法示例。


在下文中一共展示了InputStream.read_long方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: list

import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
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 ) ;
    }

    return result ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:BootstrapResolverImpl.java

示例2: StubIORImpl

import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:StubIORImpl.java

示例3: initializeComponentsFromAny

import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
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
        // but only for primitive types
        anys[i] = DynAnyUtil.extractAnyFromStream(contentType, input, orb);
        try {
            // Creates the appropriate subtype without copying the Any
            components[i] = DynAnyUtil.createMostDerivedDynAny(anys[i], orb, false);
        } catch (InconsistentTypeCode itc) { // impossible
        }
    }
    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:DynSequenceImpl.java

示例4: _read

import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
 * Reads unmarshalled data from <code>input</code> and assigns it to
 * the <code>value</code> field in this <code>IntHolder</code> object.
 *
 * @param input the <code>InputStream</code> object containing CDR
 *              formatted data from the wire
 */
public void _read(InputStream input) {
    value = input.read_long();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:IntHolder.java

示例5: _read

import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
 * Reads unmarshalled data from {@code input} and assigns it to
 * the {@code value} field in this {@code IntHolder} object.
 *
 * @param input the {@code InputStream} object containing CDR
 *              formatted data from the wire
 */
public void _read(InputStream input) {
    value = input.read_long();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:IntHolder.java


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