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


Java ValueInputStream类代码示例

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


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

示例1: skipCustomUsingFVD

import org.omg.CORBA.portable.ValueInputStream; //导入依赖的package包/类
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:IIOPInputStream.java

示例2: beginUnmarshalCustomValue

import org.omg.CORBA.portable.ValueInputStream; //导入依赖的package包/类
public void beginUnmarshalCustomValue(InputStreamHook stream,
                                      boolean calledDefaultWriteObject,
                                      boolean hasReadObject)
    throws IOException {

    if (hasReadObject) {
        if (calledDefaultWriteObject)
            stream.setState(IN_READ_OBJECT_DEFAULTS_SENT);
        else {
            try {
                if (stream.getStreamFormatVersion() == 2)
                    ((ValueInputStream)stream.getOrbStream()).start_value();
            } catch( Exception e ) {
                // This will happen for Big Integer which uses
                // writeFields in it's writeObject. We should be past
                // start_value by now.
                // NOTE: If we don't log any exception here we should
                // be fine. If there is an error, it will be caught
                // while reading the optional data.

            }
            stream.setState(IN_READ_OBJECT_OPT_DATA);
        }
    } else {
        if (calledDefaultWriteObject)
            stream.setState(NO_READ_OBJECT_DEFAULTS_SENT);
        else
            // XXX I18N and logging needed.
            throw new StreamCorruptedException("No default data sent");
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:InputStreamHook.java

示例3: endUnmarshalCustomValue

import org.omg.CORBA.portable.ValueInputStream; //导入依赖的package包/类
public void endUnmarshalCustomValue(InputStreamHook stream) {

            // In stream format version 2, we can skip over
            // the optional data this way.  In stream format version 1,
            // we will probably wind up with an error if we're
            // unmarshaling a superclass.
            if (stream.getStreamFormatVersion() == 2) {
                ((ValueInputStream)stream.getOrbStream()).start_value();
                ((ValueInputStream)stream.getOrbStream()).end_value();
            }

            stream.setState(DEFAULT_STATE);
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:InputStreamHook.java

示例4: endDefaultReadObject

import org.omg.CORBA.portable.ValueInputStream; //导入依赖的package包/类
public void endDefaultReadObject(InputStreamHook stream) throws IOException {

            // Read the fake valuetype header in stream format version 2
            if (stream.getStreamFormatVersion() == 2)
                ((ValueInputStream)stream.getOrbStream()).start_value();

            stream.setState(IN_READ_OBJECT_OPT_DATA);
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:InputStreamHook.java


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