JavaTM 2 Platform
Standard Ed. 6

org.omg.CORBA
类 ByteHolder

java.lang.Object
  继承者 org.omg.CORBA.ByteHolder
所有已实现的接口:
Streamable

public final class ByteHolder
extends Object
implements Streamable

Byte 的 Holder。关于 Holder 文件的更多信息,请参阅“生成的文件:Holder 文件”

byte 值的 Holder 类,用来存储 IDL 方法中的 "out" 和 "inout" 参数。如果 IDL 方法签名将一个 IDL octet 作为 "out" 或 "inout" 参数,则程序员必须传递一个 ByteHolder 实例作为方法调用中的相应参数;对于 "inout" 参数,程序员还必须填充将被发送到服务器的 "in" 值。在方法调用返回之前,ORB 将填充与从服务器返回的 "out" 值对应的值。

如果 myByteHolderByteHolder 实例,则可以使用 myByteHolder.value 访问存储在其 value 字段中的值。

从以下版本开始:
JDK1.2

字段摘要
 byte value
          此 ByteHolder 对象保存的 byte 值。
 
构造方法摘要
ByteHolder()
          构造一个新的 ByteHolder 对象,将其 value 字段初始化为 0。
ByteHolder(byte initial)
          为给定 byte 构造一个新的 ByteHolder 对象。
 
方法摘要
 void _read(InputStream input)
          从 input 中读取数据,并使用已解组数据初始化此 ByteHolder 对象中的值。
 TypeCode _type()
          返回对应于此 ByteHolder 对象中所保存的值的 TypeCode。
 void _write(OutputStream output)
          将此 ByteHolder 对象中的值编组到 output
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

value

public byte value
ByteHolder 对象保存的 byte 值。

构造方法详细信息

ByteHolder

public ByteHolder()
构造一个新的 ByteHolder 对象,将其 value 字段初始化为 0。


ByteHolder

public ByteHolder(byte initial)
为给定 byte 构造一个新的 ByteHolder 对象。

参数:
initial - 用来初始化新 ByteHolder 对象 value 字段的 byte
方法详细信息

_read

public void _read(InputStream input)
input 中读取数据,并使用已解组数据初始化此 ByteHolder 对象中的值。

指定者:
接口 Streamable 中的 _read
参数:
input - 包含从导线获取的 CDR 格式数据的 InputStream。

_write

public void _write(OutputStream output)
将此 ByteHolder 对象中的值编组到 output

指定者:
接口 Streamable 中的 _write
参数:
output - 将包含 CDR 格式数据的 OutputStream。

_type

public TypeCode _type()
返回对应于此 ByteHolder 对象中所保存的值的 TypeCode。

指定者:
接口 Streamable 中的 _type
返回:
ByteHolder 对象中所保存值的 TypeCode

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only