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" 值對應的值。

如果 myByteHolder 是 ByteHolder 實例,則可以使用 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。