13.8 Bytesクラス
Bytesクラスのメソッドを使用すると、Bytesオブジェクトに関連する特定のタスクを実行できます。
表13-9 Bytesメソッドの概要
| メソッド | 概要 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13.8.1 Bytes()
Bytesクラスのコンストラクタです。
| 構文 | 説明 |
|---|---|
Bytes( Environment *env = NULL); |
|
Bytes( unsigned char *value, unsigned int count unsigned int offset = 0, const Environment *env = NULL); |
文字配列から、バイトのサブ配列が含まれる |
Bytes( const Bytes &e); |
|
| パラメータ | 説明 |
|---|---|
env |
環境を指定します。 |
value |
新規オブジェクトの初期値を指定します。 |
count |
新規のBytesオブジェクトにコピーする文字配列のサブセットのサイズを指定します。 |
offset |
文字配列のコピー開始位置を指定します。 |
e |
コピー元の |
13.8.2 byteAt()
Bytesオブジェクトの指定した位置のバイトを戻します。
構文
unsigned char byteAt( unsigned int index) const;
| パラメータ | 説明 |
|---|---|
index |
|
13.8.3 getBytes()
Bytesオブジェクトから指定したバイト配列にバイトをコピーします。
構文
void getBytes( unsigned char *dst, unsigned int count, unsigned int srcBegin = 0, unsigned int dstBegin = 0) const;
| パラメータ | 説明 |
|---|---|
dst |
|
count |
コピーするバイト数。 |
srcBegin |
|
dstBegin |
宛先バッファに書き込むデータの開始位置を指定します。 |
13.8.4 isNull()
BytesオブジェクトがアトミックNULLかどうかをテストします。BytesオブジェクトがアトミックNULLの場合はTRUEを、それ以外の場合はFALSEを戻します。
構文
bool isNull() const;
13.8.6 operator=()
Bytesクラスの代入演算子です。
構文
void operator=( const Bytes& bytes);
| パラメータ | 説明 |
|---|---|
bytes |
オリジナルの |