バイト配列を表す不変オブジェクト。
サイン:
export declare class Bytes
メソッド
方法 | 修飾子 | 説明 |
---|---|---|
fromBase64String(base64) | static | 指定された Base64 文字列から新しいBytes オブジェクトを作成し、それをバイトに変換します。 |
fromUint8Array(配列) | static | 指定された Uint8Array から新しいBytes オブジェクトを作成します。 |
isEqual(その他) | このBytes オブジェクトが指定されたものと等しい場合は true を返します。 | |
toBase64() | 基礎となるバイトを Base64 でエンコードされた文字列として返します。 | |
toString() | Bytes オブジェクトの文字列表現を返します。 | |
toUint8Array() | 新しいUint8Array 内の基礎となるバイトを返します。 |
Bytes.fromBase64String()
指定された Base64 文字列から新しいBytes
オブジェクトを作成し、それをバイトに変換します。
サイン:
static fromBase64String(base64: string): Bytes;
パラメーター
パラメータ | タイプ | 説明 |
---|---|---|
Base64 | 弦 | Bytes オブジェクトの作成に使用される Base64 文字列。 |
戻り値:
Bytes.fromUint8Array()
指定された Uint8Array から新しいBytes
オブジェクトを作成します。
サイン:
static fromUint8Array(array: Uint8Array): Bytes;
パラメーター
パラメータ | タイプ | 説明 |
---|---|---|
配列 | Uint8Array | Bytes オブジェクトの作成に使用される Uint8Array。 |
戻り値:
Bytes.isEqual()
このBytes
オブジェクトが指定されたものと等しい場合は true を返します。
サイン:
isEqual(other: Bytes): boolean;
パラメーター
パラメータ | タイプ | 説明 |
---|---|---|
他の | バイト | 比較するBytes オブジェクト。 |
戻り値:
ブール値
このBytes
オブジェクトが指定されたものと等しい場合は true。
Bytes.toBase64()
基礎となるバイトを Base64 でエンコードされた文字列として返します。
サイン:
toBase64(): string;
戻り値:
弦
Bytes
オブジェクトから作成された Base64 エンコードされた文字列。
Bytes.toString()
Bytes
オブジェクトの文字列表現を返します。
サイン:
toString(): string;
戻り値:
弦
Bytes
オブジェクトの文字列表現。
Bytes.toUint8Array()
新しいUint8Array
内の基礎となるバイトを返します。 。
サイン:
toUint8Array(): Uint8Array;
戻り値:
Uint8Array
Bytes
オブジェクトから作成された Uint8Array。