161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (The type of "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkTS
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * The Buffer class is a global type for dealing with binary data directly. It can be constructed in a variety of ways.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @namespace buffer
2561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
2661847f8eSopenharmony_ci * @since 9
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_ci/**
2961847f8eSopenharmony_ci * The Buffer class is a global type for dealing with binary data directly. It can be constructed in a variety of ways.
3061847f8eSopenharmony_ci *
3161847f8eSopenharmony_ci * @namespace buffer
3261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
3361847f8eSopenharmony_ci * @crossplatform
3461847f8eSopenharmony_ci * @since 10
3561847f8eSopenharmony_ci */
3661847f8eSopenharmony_ci/**
3761847f8eSopenharmony_ci * The Buffer class is a global type for dealing with binary data directly. It can be constructed in a variety of ways.
3861847f8eSopenharmony_ci *
3961847f8eSopenharmony_ci * @namespace buffer
4061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
4161847f8eSopenharmony_ci * @crossplatform
4261847f8eSopenharmony_ci * @atomicservice
4361847f8eSopenharmony_ci * @since 11
4461847f8eSopenharmony_ci */
4561847f8eSopenharmony_cideclare namespace buffer {
4661847f8eSopenharmony_ci  /**
4761847f8eSopenharmony_ci   * This parameter specifies the type of a common encoding format.
4861847f8eSopenharmony_ci   *
4961847f8eSopenharmony_ci   * @typedef { 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex' }
5061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5161847f8eSopenharmony_ci   * @since 9
5261847f8eSopenharmony_ci   */
5361847f8eSopenharmony_ci  /**
5461847f8eSopenharmony_ci   * This parameter specifies the type of a common encoding format.
5561847f8eSopenharmony_ci   *
5661847f8eSopenharmony_ci   * @typedef { 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex' }
5761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5861847f8eSopenharmony_ci   * @crossplatform
5961847f8eSopenharmony_ci   * @since 10
6061847f8eSopenharmony_ci   */
6161847f8eSopenharmony_ci  /**
6261847f8eSopenharmony_ci   * This parameter specifies the type of a common encoding format.
6361847f8eSopenharmony_ci   *
6461847f8eSopenharmony_ci   * @typedef { 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex' }
6561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
6661847f8eSopenharmony_ci   * @crossplatform
6761847f8eSopenharmony_ci   * @atomicservice
6861847f8eSopenharmony_ci   * @since 11
6961847f8eSopenharmony_ci   */
7061847f8eSopenharmony_ci  type BufferEncoding =
7161847f8eSopenharmony_ci    | 'ascii'
7261847f8eSopenharmony_ci    | 'utf8'
7361847f8eSopenharmony_ci    | 'utf-8'
7461847f8eSopenharmony_ci    | 'utf16le'
7561847f8eSopenharmony_ci    | 'ucs2'
7661847f8eSopenharmony_ci    | 'ucs-2'
7761847f8eSopenharmony_ci    | 'base64'
7861847f8eSopenharmony_ci    | 'base64url'
7961847f8eSopenharmony_ci    | 'latin1'
8061847f8eSopenharmony_ci    | 'binary'
8161847f8eSopenharmony_ci    | 'hex';
8261847f8eSopenharmony_ci  /**
8361847f8eSopenharmony_ci   * TypedArray inherits the features and methods of Int8Array
8461847f8eSopenharmony_ci   *
8561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
8661847f8eSopenharmony_ci   * @since 9
8761847f8eSopenharmony_ci   */
8861847f8eSopenharmony_ci  /**
8961847f8eSopenharmony_ci   * TypedArray inherits the features and methods of Int8Array
9061847f8eSopenharmony_ci   *
9161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
9261847f8eSopenharmony_ci   * @crossplatform
9361847f8eSopenharmony_ci   * @since 10
9461847f8eSopenharmony_ci   */
9561847f8eSopenharmony_ci  /**
9661847f8eSopenharmony_ci   * TypedArray inherits the features and methods of Int8Array
9761847f8eSopenharmony_ci   * 
9861847f8eSopenharmony_ci   * @interface TypedArray
9961847f8eSopenharmony_ci   * @extends Int8Array
10061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
10161847f8eSopenharmony_ci   * @crossplatform
10261847f8eSopenharmony_ci   * @atomicservice
10361847f8eSopenharmony_ci   * @since 11
10461847f8eSopenharmony_ci   */
10561847f8eSopenharmony_ci  interface TypedArray extends Int8Array {}
10661847f8eSopenharmony_ci  /**
10761847f8eSopenharmony_ci   * Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled.
10861847f8eSopenharmony_ci   *
10961847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
11061847f8eSopenharmony_ci   * @param { string | Buffer | number } [fill] - fill [fill=0] A value to pre-fill the new Buffer with
11161847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8']  If `fill` is a string, this is its encoding
11261847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
11361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
11461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
11561847f8eSopenharmony_ci   * 2.Incorrect parameter types;
11661847f8eSopenharmony_ci   * 3.Parameter verification failed.
11761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
11861847f8eSopenharmony_ci   * @since 9
11961847f8eSopenharmony_ci   */
12061847f8eSopenharmony_ci  /**
12161847f8eSopenharmony_ci   * Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled.
12261847f8eSopenharmony_ci   *
12361847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
12461847f8eSopenharmony_ci   * @param { string | Buffer | number } [fill] - fill [fill=0] A value to pre-fill the new Buffer with
12561847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8']  If `fill` is a string, this is its encoding
12661847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
12761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
12861847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
12961847f8eSopenharmony_ci   * 2.Incorrect parameter types;
13061847f8eSopenharmony_ci   * 3.Parameter verification failed.
13161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
13261847f8eSopenharmony_ci   * @crossplatform
13361847f8eSopenharmony_ci   * @since 10
13461847f8eSopenharmony_ci   */
13561847f8eSopenharmony_ci  /**
13661847f8eSopenharmony_ci   * Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled.
13761847f8eSopenharmony_ci   *
13861847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
13961847f8eSopenharmony_ci   * @param { string | Buffer | number } [fill] - fill [fill=0] A value to pre-fill the new Buffer with
14061847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8']  If `fill` is a string, this is its encoding
14161847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
14261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
14361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
14461847f8eSopenharmony_ci   * 2.Incorrect parameter types;
14561847f8eSopenharmony_ci   * 3.Parameter verification failed.
14661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
14761847f8eSopenharmony_ci   * @crossplatform
14861847f8eSopenharmony_ci   * @atomicservice
14961847f8eSopenharmony_ci   * @since 11
15061847f8eSopenharmony_ci   */
15161847f8eSopenharmony_ci  function alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
15261847f8eSopenharmony_ci
15361847f8eSopenharmony_ci  /**
15461847f8eSopenharmony_ci   * Allocates a new Buffer for a fixed size bytes. The Buffer will not be initially filled.
15561847f8eSopenharmony_ci   *
15661847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
15761847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
15861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
15961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
16061847f8eSopenharmony_ci   * 2.Incorrect parameter types;
16161847f8eSopenharmony_ci   * 3.Parameter verification failed.
16261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
16361847f8eSopenharmony_ci   * @since 9
16461847f8eSopenharmony_ci   */
16561847f8eSopenharmony_ci  /**
16661847f8eSopenharmony_ci   * Allocates a new Buffer for a fixed size bytes. The Buffer will not be initially filled.
16761847f8eSopenharmony_ci   *
16861847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
16961847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
17061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
17161847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
17261847f8eSopenharmony_ci   * 2.Incorrect parameter types;
17361847f8eSopenharmony_ci   * 3.Parameter verification failed.
17461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
17561847f8eSopenharmony_ci   * @crossplatform
17661847f8eSopenharmony_ci   * @since 10
17761847f8eSopenharmony_ci   */
17861847f8eSopenharmony_ci  /**
17961847f8eSopenharmony_ci   * Allocates a new Buffer for a fixed size bytes. The Buffer will not be initially filled.
18061847f8eSopenharmony_ci   *
18161847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
18261847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
18361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
18461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
18561847f8eSopenharmony_ci   * 2.Incorrect parameter types;
18661847f8eSopenharmony_ci   * 3.Parameter verification failed.
18761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
18861847f8eSopenharmony_ci   * @crossplatform
18961847f8eSopenharmony_ci   * @atomicservice
19061847f8eSopenharmony_ci   * @since 11
19161847f8eSopenharmony_ci   */
19261847f8eSopenharmony_ci  function allocUninitializedFromPool(size: number): Buffer;
19361847f8eSopenharmony_ci
19461847f8eSopenharmony_ci  /**
19561847f8eSopenharmony_ci   * Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled.
19661847f8eSopenharmony_ci   *
19761847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
19861847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
19961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
20061847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
20161847f8eSopenharmony_ci   * 2.Incorrect parameter types;
20261847f8eSopenharmony_ci   * 3.Parameter verification failed.
20361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
20461847f8eSopenharmony_ci   * @since 9
20561847f8eSopenharmony_ci   */
20661847f8eSopenharmony_ci  /**
20761847f8eSopenharmony_ci   * Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled.
20861847f8eSopenharmony_ci   *
20961847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
21061847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
21161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
21261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
21361847f8eSopenharmony_ci   * 2.Incorrect parameter types;
21461847f8eSopenharmony_ci   * 3.Parameter verification failed.
21561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
21661847f8eSopenharmony_ci   * @crossplatform
21761847f8eSopenharmony_ci   * @since 10
21861847f8eSopenharmony_ci   */
21961847f8eSopenharmony_ci  /**
22061847f8eSopenharmony_ci   * Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled.
22161847f8eSopenharmony_ci   *
22261847f8eSopenharmony_ci   * @param { number } size - size size The desired length of the new Buffer
22361847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
22461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
22561847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
22661847f8eSopenharmony_ci   * 2.Incorrect parameter types;
22761847f8eSopenharmony_ci   * 3.Parameter verification failed.
22861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
22961847f8eSopenharmony_ci   * @crossplatform
23061847f8eSopenharmony_ci   * @atomicservice
23161847f8eSopenharmony_ci   * @since 11
23261847f8eSopenharmony_ci   */
23361847f8eSopenharmony_ci  function allocUninitialized(size: number): Buffer;
23461847f8eSopenharmony_ci
23561847f8eSopenharmony_ci  /**
23661847f8eSopenharmony_ci   * Returns the byte length of a string when encoded using `encoding`.
23761847f8eSopenharmony_ci   * This is not the same as [`String.prototype.length`], which does not account
23861847f8eSopenharmony_ci   * for the encoding that is used to convert the string into bytes.
23961847f8eSopenharmony_ci   *
24061847f8eSopenharmony_ci   * @param { string | Buffer | TypedArray | DataView | ArrayBuffer | SharedArrayBuffer } string - string string A value to calculate the length of
24161847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If `string` is a string, this is its encoding
24261847f8eSopenharmony_ci   * @returns { number } The number of bytes contained within `string`
24361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
24461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
24561847f8eSopenharmony_ci   * 2.Incorrect parameter types.
24661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
24761847f8eSopenharmony_ci   * @since 9
24861847f8eSopenharmony_ci   */
24961847f8eSopenharmony_ci  /**
25061847f8eSopenharmony_ci   * Returns the byte length of a string when encoded using `encoding`.
25161847f8eSopenharmony_ci   * This is not the same as [`String.prototype.length`], which does not account
25261847f8eSopenharmony_ci   * for the encoding that is used to convert the string into bytes.
25361847f8eSopenharmony_ci   *
25461847f8eSopenharmony_ci   * @param { string | Buffer | TypedArray | DataView | ArrayBuffer | SharedArrayBuffer } string - string string A value to calculate the length of
25561847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If `string` is a string, this is its encoding
25661847f8eSopenharmony_ci   * @returns { number } The number of bytes contained within `string`
25761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
25861847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
25961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
26061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
26161847f8eSopenharmony_ci   * @crossplatform
26261847f8eSopenharmony_ci   * @since 10
26361847f8eSopenharmony_ci   */
26461847f8eSopenharmony_ci  /**
26561847f8eSopenharmony_ci   * Returns the byte length of a string when encoded using `encoding`.
26661847f8eSopenharmony_ci   * This is not the same as [`String.prototype.length`], which does not account
26761847f8eSopenharmony_ci   * for the encoding that is used to convert the string into bytes.
26861847f8eSopenharmony_ci   *
26961847f8eSopenharmony_ci   * @param { string | Buffer | TypedArray | DataView | ArrayBuffer | SharedArrayBuffer } string - string string A value to calculate the length of
27061847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If `string` is a string, this is its encoding
27161847f8eSopenharmony_ci   * @returns { number } The number of bytes contained within `string`
27261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
27361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
27461847f8eSopenharmony_ci   * 2.Incorrect parameter types.
27561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
27661847f8eSopenharmony_ci   * @crossplatform
27761847f8eSopenharmony_ci   * @atomicservice
27861847f8eSopenharmony_ci   * @since 11
27961847f8eSopenharmony_ci   */
28061847f8eSopenharmony_ci  function byteLength(
28161847f8eSopenharmony_ci    string: string | Buffer | TypedArray | DataView | ArrayBuffer | SharedArrayBuffer,
28261847f8eSopenharmony_ci    encoding?: BufferEncoding
28361847f8eSopenharmony_ci  ): number;
28461847f8eSopenharmony_ci
28561847f8eSopenharmony_ci  /**
28661847f8eSopenharmony_ci   * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
28761847f8eSopenharmony_ci   *
28861847f8eSopenharmony_ci   * @param { Buffer[] | Uint8Array[] } list - list list List of `Buffer` or Uint8Array instances to concatenate
28961847f8eSopenharmony_ci   * @param { number } [totalLength] - totalLength totalLength Total length of the `Buffer` instances in `list` when concatenated
29061847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
29161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
29261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
29361847f8eSopenharmony_ci   * 2.Incorrect parameter types;
29461847f8eSopenharmony_ci   * 3.Parameter verification failed.
29561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of "length" is out of range. It must be >= 0 and <= uint32 max. Received value is: [length]
29661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
29761847f8eSopenharmony_ci   * @since 9
29861847f8eSopenharmony_ci   */
29961847f8eSopenharmony_ci  /**
30061847f8eSopenharmony_ci   * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
30161847f8eSopenharmony_ci   *
30261847f8eSopenharmony_ci   * @param { Buffer[] | Uint8Array[] } list - list list List of `Buffer` or Uint8Array instances to concatenate
30361847f8eSopenharmony_ci   * @param { number } [totalLength] - totalLength totalLength Total length of the `Buffer` instances in `list` when concatenated
30461847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
30561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
30661847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
30761847f8eSopenharmony_ci   * 2.Incorrect parameter types;
30861847f8eSopenharmony_ci   * 3.Parameter verification failed.
30961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of "length" is out of range. It must be >= 0 and <= uint32 max. Received value is: [length]
31061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
31161847f8eSopenharmony_ci   * @crossplatform
31261847f8eSopenharmony_ci   * @since 10
31361847f8eSopenharmony_ci   */
31461847f8eSopenharmony_ci  /**
31561847f8eSopenharmony_ci   * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
31661847f8eSopenharmony_ci   *
31761847f8eSopenharmony_ci   * @param { Buffer[] | Uint8Array[] } list - list list List of `Buffer` or Uint8Array instances to concatenate
31861847f8eSopenharmony_ci   * @param { number } [totalLength] - totalLength totalLength Total length of the `Buffer` instances in `list` when concatenated
31961847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
32061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
32161847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
32261847f8eSopenharmony_ci   * 2.Incorrect parameter types;
32361847f8eSopenharmony_ci   * 3.Parameter verification failed.
32461847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of "length" is out of range. It must be >= 0 and <= uint32 max. Received value is: [length]
32561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
32661847f8eSopenharmony_ci   * @crossplatform
32761847f8eSopenharmony_ci   * @atomicservice
32861847f8eSopenharmony_ci   * @since 11
32961847f8eSopenharmony_ci   */
33061847f8eSopenharmony_ci  function concat(list: Buffer[] | Uint8Array[], totalLength?: number): Buffer;
33161847f8eSopenharmony_ci
33261847f8eSopenharmony_ci  /**
33361847f8eSopenharmony_ci   * Allocates a new Buffer using an array of bytes in the range 0 – 255. Array entries outside that range will be truncated to fit into it.
33461847f8eSopenharmony_ci   *
33561847f8eSopenharmony_ci   * @param { number[] } array - array array an array of bytes in the range 0 – 255
33661847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
33761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
33861847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
33961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
34061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
34161847f8eSopenharmony_ci   * @since 9
34261847f8eSopenharmony_ci   */
34361847f8eSopenharmony_ci  /**
34461847f8eSopenharmony_ci   * Allocates a new Buffer using an array of bytes in the range 0 – 255. Array entries outside that range will be truncated to fit into it.
34561847f8eSopenharmony_ci   *
34661847f8eSopenharmony_ci   * @param { number[] } array - array array an array of bytes in the range 0 – 255
34761847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
34861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
34961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
35061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
35161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
35261847f8eSopenharmony_ci   * @crossplatform
35361847f8eSopenharmony_ci   * @since 10
35461847f8eSopenharmony_ci   */
35561847f8eSopenharmony_ci  /**
35661847f8eSopenharmony_ci   * Allocates a new Buffer using an array of bytes in the range 0 – 255. Array entries outside that range will be truncated to fit into it.
35761847f8eSopenharmony_ci   *
35861847f8eSopenharmony_ci   * @param { number[] } array - array array an array of bytes in the range 0 – 255
35961847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
36061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
36161847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
36261847f8eSopenharmony_ci   * 2.Incorrect parameter types.
36361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
36461847f8eSopenharmony_ci   * @crossplatform
36561847f8eSopenharmony_ci   * @atomicservice
36661847f8eSopenharmony_ci   * @since 11
36761847f8eSopenharmony_ci   */
36861847f8eSopenharmony_ci  function from(array: number[]): Buffer;
36961847f8eSopenharmony_ci
37061847f8eSopenharmony_ci  /**
37161847f8eSopenharmony_ci   * This creates a view of the ArrayBuffer without copying the underlying memory.
37261847f8eSopenharmony_ci   *
37361847f8eSopenharmony_ci   * @param { ArrayBuffer | SharedArrayBuffer } arrayBuffer - arrayBuffer arrayBuffer An ArrayBuffer, 
37461847f8eSopenharmony_ci   * SharedArrayBuffer, for example the .buffer property of a TypedArray.
37561847f8eSopenharmony_ci   * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Index of first byte to expose
37661847f8eSopenharmony_ci   * @param { number } [length] - length [length = arrayBuffer.byteLength - byteOffset] Number of bytes to expose
37761847f8eSopenharmony_ci   * @returns { Buffer } Return a view of the ArrayBuffer
37861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
37961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
38061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
38161847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of "[byteOffset/length]" is out of range.
38261847f8eSopenharmony_ci   * It must be >= [left range] and <= [right range]. Received value is: [byteOffset/length]
38361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
38461847f8eSopenharmony_ci   * @since 9
38561847f8eSopenharmony_ci   */
38661847f8eSopenharmony_ci  /**
38761847f8eSopenharmony_ci   * This creates a view of the ArrayBuffer without copying the underlying memory.
38861847f8eSopenharmony_ci   *
38961847f8eSopenharmony_ci   * @param { ArrayBuffer | SharedArrayBuffer } arrayBuffer - arrayBuffer arrayBuffer An ArrayBuffer, 
39061847f8eSopenharmony_ci   * SharedArrayBuffer, for example the .buffer property of a TypedArray.
39161847f8eSopenharmony_ci   * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Index of first byte to expose
39261847f8eSopenharmony_ci   * @param { number } [length] - length [length = arrayBuffer.byteLength - byteOffset] Number of bytes to expose
39361847f8eSopenharmony_ci   * @returns { Buffer } Return a view of the ArrayBuffer
39461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
39561847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
39661847f8eSopenharmony_ci   * 2.Incorrect parameter types.
39761847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of "[byteOffset/length]" is out of range.
39861847f8eSopenharmony_ci   * It must be >= [left range] and <= [right range]. Received value is: [byteOffset/length]
39961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
40061847f8eSopenharmony_ci   * @crossplatform
40161847f8eSopenharmony_ci   * @since 10
40261847f8eSopenharmony_ci   */
40361847f8eSopenharmony_ci  /**
40461847f8eSopenharmony_ci   * This creates a view of the ArrayBuffer without copying the underlying memory.
40561847f8eSopenharmony_ci   *
40661847f8eSopenharmony_ci   * @param { ArrayBuffer | SharedArrayBuffer } arrayBuffer - arrayBuffer arrayBuffer An ArrayBuffer, 
40761847f8eSopenharmony_ci   * SharedArrayBuffer, for example the .buffer property of a TypedArray.
40861847f8eSopenharmony_ci   * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Index of first byte to expose
40961847f8eSopenharmony_ci   * @param { number } [length] - length [length = arrayBuffer.byteLength - byteOffset] Number of bytes to expose
41061847f8eSopenharmony_ci   * @returns { Buffer } Return a view of the ArrayBuffer
41161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
41261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
41361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
41461847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of "[byteOffset/length]" is out of range.
41561847f8eSopenharmony_ci   * It must be >= [left range] and <= [right range]. Received value is: [byteOffset/length]
41661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
41761847f8eSopenharmony_ci   * @crossplatform
41861847f8eSopenharmony_ci   * @atomicservice
41961847f8eSopenharmony_ci   * @since 11
42061847f8eSopenharmony_ci   */
42161847f8eSopenharmony_ci  function from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;
42261847f8eSopenharmony_ci
42361847f8eSopenharmony_ci  /**
42461847f8eSopenharmony_ci   * Copies the passed buffer data onto a new Buffer instance.
42561847f8eSopenharmony_ci   *
42661847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buffer - buffer buffer An existing Buffer or Uint8Array from which to copy data
42761847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
42861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
42961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
43061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
43161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
43261847f8eSopenharmony_ci   * @since 9
43361847f8eSopenharmony_ci   */
43461847f8eSopenharmony_ci  /**
43561847f8eSopenharmony_ci   * Copies the passed buffer data onto a new Buffer instance.
43661847f8eSopenharmony_ci   *
43761847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buffer - buffer buffer An existing Buffer or Uint8Array from which to copy data
43861847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
43961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
44061847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
44161847f8eSopenharmony_ci   * 2.Incorrect parameter types.
44261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
44361847f8eSopenharmony_ci   * @crossplatform
44461847f8eSopenharmony_ci   * @since 10
44561847f8eSopenharmony_ci   */
44661847f8eSopenharmony_ci  /**
44761847f8eSopenharmony_ci   * Copies the passed buffer data onto a new Buffer instance.
44861847f8eSopenharmony_ci   *
44961847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buffer - buffer buffer An existing Buffer or Uint8Array from which to copy data
45061847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
45161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
45261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
45361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
45461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
45561847f8eSopenharmony_ci   * @crossplatform
45661847f8eSopenharmony_ci   * @atomicservice
45761847f8eSopenharmony_ci   * @since 11
45861847f8eSopenharmony_ci   */
45961847f8eSopenharmony_ci  function from(buffer: Buffer | Uint8Array): Buffer;
46061847f8eSopenharmony_ci
46161847f8eSopenharmony_ci  /**
46261847f8eSopenharmony_ci   * For the object whose value returned by valueof() function is strictly equal to object
46361847f8eSopenharmony_ci   * or supports symbol To primitive object, a new buffer instance is created.
46461847f8eSopenharmony_ci   *
46561847f8eSopenharmony_ci   * @param { Object } object - object object An object supporting Symbol.toPrimitive or valueOf()
46661847f8eSopenharmony_ci   * @param { number | string } offsetOrEncoding - offsetOrEncoding offsetOrEncoding A byte-offset or encoding
46761847f8eSopenharmony_ci   * @param { number } length - length length A length
46861847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
46961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
47061847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
47161847f8eSopenharmony_ci   * 2.Incorrect parameter types.
47261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
47361847f8eSopenharmony_ci   * @since 9
47461847f8eSopenharmony_ci   */
47561847f8eSopenharmony_ci  /**
47661847f8eSopenharmony_ci   * For the object whose value returned by valueof() function is strictly equal to object
47761847f8eSopenharmony_ci   * or supports symbol To primitive object, a new buffer instance is created.
47861847f8eSopenharmony_ci   *
47961847f8eSopenharmony_ci   * @param { Object } object - object object An object supporting Symbol.toPrimitive or valueOf()
48061847f8eSopenharmony_ci   * @param { number | string } offsetOrEncoding - offsetOrEncoding offsetOrEncoding A byte-offset or encoding
48161847f8eSopenharmony_ci   * @param { number } length - length length A length
48261847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
48361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
48461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
48561847f8eSopenharmony_ci   * 2.Incorrect parameter types.
48661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
48761847f8eSopenharmony_ci   * @crossplatform
48861847f8eSopenharmony_ci   * @since 10
48961847f8eSopenharmony_ci   */
49061847f8eSopenharmony_ci  /**
49161847f8eSopenharmony_ci   * For the object whose value returned by valueof() function is strictly equal to object
49261847f8eSopenharmony_ci   * or supports symbol To primitive object, a new buffer instance is created.
49361847f8eSopenharmony_ci   *
49461847f8eSopenharmony_ci   * @param { Object } object - object object An object supporting Symbol.toPrimitive or valueOf()
49561847f8eSopenharmony_ci   * @param { number | string } offsetOrEncoding - offsetOrEncoding offsetOrEncoding A byte-offset or encoding
49661847f8eSopenharmony_ci   * @param { number } length - length length A length
49761847f8eSopenharmony_ci   * @returns { Buffer } Return a new allocated Buffer
49861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
49961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
50061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
50161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
50261847f8eSopenharmony_ci   * @crossplatform
50361847f8eSopenharmony_ci   * @atomicservice
50461847f8eSopenharmony_ci   * @since 11
50561847f8eSopenharmony_ci   */
50661847f8eSopenharmony_ci  function from(object: Object, offsetOrEncoding: number | string, length: number): Buffer;
50761847f8eSopenharmony_ci
50861847f8eSopenharmony_ci  /**
50961847f8eSopenharmony_ci   * Creates a new Buffer containing string. The encoding parameter identifies the character encoding
51061847f8eSopenharmony_ci   * to be used when converting string into bytes.
51161847f8eSopenharmony_ci   *
51261847f8eSopenharmony_ci   * @param { String } string - string string  A string to encode
51361847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The encoding of string
51461847f8eSopenharmony_ci   * @returns { Buffer } Return a new Buffer containing string
51561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
51661847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
51761847f8eSopenharmony_ci   * 2.Incorrect parameter types.
51861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
51961847f8eSopenharmony_ci   * @since 9
52061847f8eSopenharmony_ci   */
52161847f8eSopenharmony_ci  /**
52261847f8eSopenharmony_ci   * Creates a new Buffer containing string. The encoding parameter identifies the character encoding
52361847f8eSopenharmony_ci   * to be used when converting string into bytes.
52461847f8eSopenharmony_ci   *
52561847f8eSopenharmony_ci   * @param { String } string - string string  A string to encode
52661847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The encoding of string
52761847f8eSopenharmony_ci   * @returns { Buffer } Return a new Buffer containing string
52861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
52961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
53061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
53161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
53261847f8eSopenharmony_ci   * @crossplatform
53361847f8eSopenharmony_ci   * @since 10
53461847f8eSopenharmony_ci   */
53561847f8eSopenharmony_ci  /**
53661847f8eSopenharmony_ci   * Creates a new Buffer containing string. The encoding parameter identifies the character encoding
53761847f8eSopenharmony_ci   * to be used when converting string into bytes.
53861847f8eSopenharmony_ci   *
53961847f8eSopenharmony_ci   * @param { String } string - string string  A string to encode
54061847f8eSopenharmony_ci   * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The encoding of string
54161847f8eSopenharmony_ci   * @returns { Buffer } Return a new Buffer containing string
54261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
54361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
54461847f8eSopenharmony_ci   * 2.Incorrect parameter types.
54561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
54661847f8eSopenharmony_ci   * @crossplatform
54761847f8eSopenharmony_ci   * @atomicservice
54861847f8eSopenharmony_ci   * @since 11
54961847f8eSopenharmony_ci   */
55061847f8eSopenharmony_ci  function from(string: String, encoding?: BufferEncoding): Buffer;
55161847f8eSopenharmony_ci
55261847f8eSopenharmony_ci  /**
55361847f8eSopenharmony_ci   * Returns true if obj is a Buffer, false otherwise
55461847f8eSopenharmony_ci   *
55561847f8eSopenharmony_ci   * @param { Object } obj - obj obj Objects to be judged
55661847f8eSopenharmony_ci   * @returns { boolean } true or false
55761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
55861847f8eSopenharmony_ci   * @since 9
55961847f8eSopenharmony_ci   */
56061847f8eSopenharmony_ci  /**
56161847f8eSopenharmony_ci   * Returns true if obj is a Buffer, false otherwise
56261847f8eSopenharmony_ci   *
56361847f8eSopenharmony_ci   * @param { Object } obj - obj obj Objects to be judged
56461847f8eSopenharmony_ci   * @returns { boolean } true or false
56561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
56661847f8eSopenharmony_ci   * @crossplatform
56761847f8eSopenharmony_ci   * @since 10
56861847f8eSopenharmony_ci   */
56961847f8eSopenharmony_ci  /**
57061847f8eSopenharmony_ci   * Returns true if obj is a Buffer, false otherwise
57161847f8eSopenharmony_ci   *
57261847f8eSopenharmony_ci   * @param { Object } obj - obj obj Objects to be judged
57361847f8eSopenharmony_ci   * @returns { boolean } true or false
57461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
57561847f8eSopenharmony_ci   * @crossplatform
57661847f8eSopenharmony_ci   * @atomicservice
57761847f8eSopenharmony_ci   * @since 11
57861847f8eSopenharmony_ci   */
57961847f8eSopenharmony_ci  function isBuffer(obj: Object): boolean;
58061847f8eSopenharmony_ci
58161847f8eSopenharmony_ci  /**
58261847f8eSopenharmony_ci   * Returns true if encoding is the name of a supported character encoding, or false otherwise.
58361847f8eSopenharmony_ci   *
58461847f8eSopenharmony_ci   * @param { string } encoding - encoding encoding A character encoding name to check
58561847f8eSopenharmony_ci   * @returns { boolean } true or false
58661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
58761847f8eSopenharmony_ci   * @since 9
58861847f8eSopenharmony_ci   */
58961847f8eSopenharmony_ci  /**
59061847f8eSopenharmony_ci   * Returns true if encoding is the name of a supported character encoding, or false otherwise.
59161847f8eSopenharmony_ci   *
59261847f8eSopenharmony_ci   * @param { string } encoding - encoding encoding A character encoding name to check
59361847f8eSopenharmony_ci   * @returns { boolean } true or false
59461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
59561847f8eSopenharmony_ci   * @crossplatform
59661847f8eSopenharmony_ci   * @since 10
59761847f8eSopenharmony_ci   */
59861847f8eSopenharmony_ci  /**
59961847f8eSopenharmony_ci   * Returns true if encoding is the name of a supported character encoding, or false otherwise.
60061847f8eSopenharmony_ci   *
60161847f8eSopenharmony_ci   * @param { string } encoding - encoding encoding A character encoding name to check
60261847f8eSopenharmony_ci   * @returns { boolean } true or false
60361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
60461847f8eSopenharmony_ci   * @crossplatform
60561847f8eSopenharmony_ci   * @atomicservice
60661847f8eSopenharmony_ci   * @since 11
60761847f8eSopenharmony_ci   */
60861847f8eSopenharmony_ci  function isEncoding(encoding: string): boolean;
60961847f8eSopenharmony_ci
61061847f8eSopenharmony_ci  /**
61161847f8eSopenharmony_ci   * Compares buf1 to buf2
61261847f8eSopenharmony_ci   *
61361847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buf1 - buf1 buf1 A Buffer or Uint8Array instance.
61461847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buf2 - buf2 buf2 A Buffer or Uint8Array instance.
61561847f8eSopenharmony_ci   * @returns { -1 | 0 | 1 } 0 is returned if target is the same as buf
61661847f8eSopenharmony_ci   *         1 is returned if target should come before buf when sorted.
61761847f8eSopenharmony_ci   *        -1 is returned if target should come after buf when sorted.
61861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
61961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
62061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
62161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
62261847f8eSopenharmony_ci   * @since 9
62361847f8eSopenharmony_ci   */
62461847f8eSopenharmony_ci  /**
62561847f8eSopenharmony_ci   * Compares buf1 to buf2
62661847f8eSopenharmony_ci   *
62761847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buf1 - buf1 buf1 A Buffer or Uint8Array instance.
62861847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buf2 - buf2 buf2 A Buffer or Uint8Array instance.
62961847f8eSopenharmony_ci   * @returns { -1 | 0 | 1 } 0 is returned if target is the same as buf
63061847f8eSopenharmony_ci   *         1 is returned if target should come before buf when sorted.
63161847f8eSopenharmony_ci   *        -1 is returned if target should come after buf when sorted.
63261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
63361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
63461847f8eSopenharmony_ci   * 2.Incorrect parameter types.
63561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
63661847f8eSopenharmony_ci   * @crossplatform
63761847f8eSopenharmony_ci   * @since 10
63861847f8eSopenharmony_ci   */
63961847f8eSopenharmony_ci  /**
64061847f8eSopenharmony_ci   * Compares buf1 to buf2
64161847f8eSopenharmony_ci   *
64261847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buf1 - buf1 buf1 A Buffer or Uint8Array instance.
64361847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } buf2 - buf2 buf2 A Buffer or Uint8Array instance.
64461847f8eSopenharmony_ci   * @returns { -1 | 0 | 1 } 0 is returned if target is the same as buf
64561847f8eSopenharmony_ci   *         1 is returned if target should come before buf when sorted.
64661847f8eSopenharmony_ci   *        -1 is returned if target should come after buf when sorted.
64761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
64861847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
64961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
65061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
65161847f8eSopenharmony_ci   * @crossplatform
65261847f8eSopenharmony_ci   * @atomicservice
65361847f8eSopenharmony_ci   * @since 11
65461847f8eSopenharmony_ci   */
65561847f8eSopenharmony_ci  function compare(buf1: Buffer | Uint8Array, buf2: Buffer | Uint8Array): -1 | 0 | 1;
65661847f8eSopenharmony_ci
65761847f8eSopenharmony_ci  /**
65861847f8eSopenharmony_ci   * Re-encodes the given Buffer or Uint8Array instance from one character encoding to another.
65961847f8eSopenharmony_ci   *
66061847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } source - source source A Buffer or Uint8Array instance.
66161847f8eSopenharmony_ci   * @param { string } fromEnc - fromEnc fromEnc The current encoding
66261847f8eSopenharmony_ci   * @param { string } toEnc - toEnc toEnc To target encoding
66361847f8eSopenharmony_ci   * @returns { Buffer } Returns a new Buffer instance
66461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
66561847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
66661847f8eSopenharmony_ci   * 2.Incorrect parameter types.
66761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
66861847f8eSopenharmony_ci   * @since 9
66961847f8eSopenharmony_ci   */
67061847f8eSopenharmony_ci  /**
67161847f8eSopenharmony_ci   * Re-encodes the given Buffer or Uint8Array instance from one character encoding to another.
67261847f8eSopenharmony_ci   *
67361847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } source - source source A Buffer or Uint8Array instance.
67461847f8eSopenharmony_ci   * @param { string } fromEnc - fromEnc fromEnc The current encoding
67561847f8eSopenharmony_ci   * @param { string } toEnc - toEnc toEnc To target encoding
67661847f8eSopenharmony_ci   * @returns { Buffer } Returns a new Buffer instance
67761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
67861847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
67961847f8eSopenharmony_ci   * 2.Incorrect parameter types.
68061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
68161847f8eSopenharmony_ci   * @crossplatform
68261847f8eSopenharmony_ci   * @since 10
68361847f8eSopenharmony_ci   */
68461847f8eSopenharmony_ci  /**
68561847f8eSopenharmony_ci   * Re-encodes the given Buffer or Uint8Array instance from one character encoding to another.
68661847f8eSopenharmony_ci   *
68761847f8eSopenharmony_ci   * @param { Buffer | Uint8Array } source - source source A Buffer or Uint8Array instance.
68861847f8eSopenharmony_ci   * @param { string } fromEnc - fromEnc fromEnc The current encoding
68961847f8eSopenharmony_ci   * @param { string } toEnc - toEnc toEnc To target encoding
69061847f8eSopenharmony_ci   * @returns { Buffer } Returns a new Buffer instance
69161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
69261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
69361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
69461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
69561847f8eSopenharmony_ci   * @crossplatform
69661847f8eSopenharmony_ci   * @atomicservice
69761847f8eSopenharmony_ci   * @since 11
69861847f8eSopenharmony_ci   */
69961847f8eSopenharmony_ci  function transcode(source: Buffer | Uint8Array, fromEnc: string, toEnc: string): Buffer;
70061847f8eSopenharmony_ci
70161847f8eSopenharmony_ci
70261847f8eSopenharmony_ci  /**
70361847f8eSopenharmony_ci   * The Buffer object is a method of handling buffers dedicated to binary data.
70461847f8eSopenharmony_ci   *
70561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
70661847f8eSopenharmony_ci   * @since 9
70761847f8eSopenharmony_ci   */
70861847f8eSopenharmony_ci  /**
70961847f8eSopenharmony_ci   * The Buffer object is a method of handling buffers dedicated to binary data.
71061847f8eSopenharmony_ci   *
71161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
71261847f8eSopenharmony_ci   * @crossplatform
71361847f8eSopenharmony_ci   * @since 10
71461847f8eSopenharmony_ci   */
71561847f8eSopenharmony_ci  /**
71661847f8eSopenharmony_ci   * The Buffer object is a method of handling buffers dedicated to binary data.
71761847f8eSopenharmony_ci   *
71861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
71961847f8eSopenharmony_ci   * @crossplatform
72061847f8eSopenharmony_ci   * @atomicservice
72161847f8eSopenharmony_ci   * @since 11
72261847f8eSopenharmony_ci   */
72361847f8eSopenharmony_ci  class Buffer {
72461847f8eSopenharmony_ci    /**
72561847f8eSopenharmony_ci     * Returns the number of bytes in buf
72661847f8eSopenharmony_ci     *
72761847f8eSopenharmony_ci     * @type { number }
72861847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - Length  cannot be set for the buffer that has only a getter.
72961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
73061847f8eSopenharmony_ci     * @since 9
73161847f8eSopenharmony_ci     */
73261847f8eSopenharmony_ci    /**
73361847f8eSopenharmony_ci     * Returns the number of bytes in buf
73461847f8eSopenharmony_ci     *
73561847f8eSopenharmony_ci     * @type { number }
73661847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - Length  cannot be set for the buffer that has only a getter.
73761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
73861847f8eSopenharmony_ci     * @crossplatform
73961847f8eSopenharmony_ci     * @since 10
74061847f8eSopenharmony_ci     */
74161847f8eSopenharmony_ci    /**
74261847f8eSopenharmony_ci     * Returns the number of bytes in buf
74361847f8eSopenharmony_ci     *
74461847f8eSopenharmony_ci     * @type { number }
74561847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - Length  cannot be set for the buffer that has only a getter.
74661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
74761847f8eSopenharmony_ci     * @crossplatform
74861847f8eSopenharmony_ci     * @atomicservice
74961847f8eSopenharmony_ci     * @since 11
75061847f8eSopenharmony_ci     */
75161847f8eSopenharmony_ci    length: number;
75261847f8eSopenharmony_ci
75361847f8eSopenharmony_ci    /**
75461847f8eSopenharmony_ci     * The underlying ArrayBuffer object based on which this Buffer object is created.
75561847f8eSopenharmony_ci     *
75661847f8eSopenharmony_ci     * @type { ArrayBuffer }
75761847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - Buffer cannot be set for the buffer that has only a getter.
75861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
75961847f8eSopenharmony_ci     * @since 9
76061847f8eSopenharmony_ci     */
76161847f8eSopenharmony_ci    /**
76261847f8eSopenharmony_ci     * The underlying ArrayBuffer object based on which this Buffer object is created.
76361847f8eSopenharmony_ci     *
76461847f8eSopenharmony_ci     * @type { ArrayBuffer }
76561847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - Buffer cannot be set for the buffer that has only a getter.
76661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
76761847f8eSopenharmony_ci     * @crossplatform
76861847f8eSopenharmony_ci     * @since 10
76961847f8eSopenharmony_ci     */
77061847f8eSopenharmony_ci    /**
77161847f8eSopenharmony_ci     * The underlying ArrayBuffer object based on which this Buffer object is created.
77261847f8eSopenharmony_ci     *
77361847f8eSopenharmony_ci     * @type { ArrayBuffer }
77461847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - Buffer cannot be set for the buffer that has only a getter.
77561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
77661847f8eSopenharmony_ci     * @crossplatform
77761847f8eSopenharmony_ci     * @atomicservice
77861847f8eSopenharmony_ci     * @since 11
77961847f8eSopenharmony_ci     */
78061847f8eSopenharmony_ci    buffer: ArrayBuffer;
78161847f8eSopenharmony_ci
78261847f8eSopenharmony_ci    /**
78361847f8eSopenharmony_ci     * The byteOffset of the Buffers underlying ArrayBuffer object
78461847f8eSopenharmony_ci     *
78561847f8eSopenharmony_ci     * @type { number }
78661847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - ByteOffset  cannot be set for the buffer that has only a getter.
78761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
78861847f8eSopenharmony_ci     * @since 9
78961847f8eSopenharmony_ci     */
79061847f8eSopenharmony_ci    /**
79161847f8eSopenharmony_ci     * The byteOffset of the Buffers underlying ArrayBuffer object
79261847f8eSopenharmony_ci     *
79361847f8eSopenharmony_ci     * @type { number }
79461847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - ByteOffset  cannot be set for the buffer that has only a getter.
79561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
79661847f8eSopenharmony_ci     * @crossplatform
79761847f8eSopenharmony_ci     * @since 10
79861847f8eSopenharmony_ci     */
79961847f8eSopenharmony_ci    /**
80061847f8eSopenharmony_ci     * The byteOffset of the Buffers underlying ArrayBuffer object
80161847f8eSopenharmony_ci     *
80261847f8eSopenharmony_ci     * @type { number }
80361847f8eSopenharmony_ci     * @throws { BusinessError } 10200013 - ByteOffset  cannot be set for the buffer that has only a getter.
80461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
80561847f8eSopenharmony_ci     * @crossplatform
80661847f8eSopenharmony_ci     * @atomicservice
80761847f8eSopenharmony_ci     * @since 11
80861847f8eSopenharmony_ci     */
80961847f8eSopenharmony_ci    byteOffset: number;
81061847f8eSopenharmony_ci
81161847f8eSopenharmony_ci    /**
81261847f8eSopenharmony_ci     * Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled.
81361847f8eSopenharmony_ci     *
81461847f8eSopenharmony_ci     * @param { string | Buffer | Uint8Array | number } value - value value The value with which to fill buf
81561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to fill buf
81661847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] Where to stop filling buf (not inclusive)
81761847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The encoding for value if value is a string
81861847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
81961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[offset/end]" is out of range. It must be >= 0 and <= [right range]. Received value is: [offset/end]
82061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
82161847f8eSopenharmony_ci     * 1.Incorrect parameter types;
82261847f8eSopenharmony_ci     * 2.Parameter verification failed.
82361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
82461847f8eSopenharmony_ci     * @since 9
82561847f8eSopenharmony_ci     */
82661847f8eSopenharmony_ci    /**
82761847f8eSopenharmony_ci     * Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled.
82861847f8eSopenharmony_ci     *
82961847f8eSopenharmony_ci     * @param { string | Buffer | Uint8Array | number } value - value value The value with which to fill buf
83061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to fill buf
83161847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] Where to stop filling buf (not inclusive)
83261847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The encoding for value if value is a string
83361847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
83461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[offset/end]" is out of range. It must be >= 0 and <= [right range]. Received value is: [offset/end]
83561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
83661847f8eSopenharmony_ci     * 1.Incorrect parameter types;
83761847f8eSopenharmony_ci     * 2.Parameter verification failed.
83861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
83961847f8eSopenharmony_ci     * @crossplatform
84061847f8eSopenharmony_ci     * @since 10
84161847f8eSopenharmony_ci     */
84261847f8eSopenharmony_ci    /**
84361847f8eSopenharmony_ci     * Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled.
84461847f8eSopenharmony_ci     *
84561847f8eSopenharmony_ci     * @param { string | Buffer | Uint8Array | number } value - value value The value with which to fill buf
84661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to fill buf
84761847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] Where to stop filling buf (not inclusive)
84861847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The encoding for value if value is a string
84961847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
85061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[offset/end]" is out of range. It must be >= 0 and <= [right range]. Received value is: [offset/end]
85161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
85261847f8eSopenharmony_ci     * 1.Incorrect parameter types;
85361847f8eSopenharmony_ci     * 2.Parameter verification failed.
85461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
85561847f8eSopenharmony_ci     * @crossplatform
85661847f8eSopenharmony_ci     * @atomicservice
85761847f8eSopenharmony_ci     * @since 11
85861847f8eSopenharmony_ci     */
85961847f8eSopenharmony_ci    fill(
86061847f8eSopenharmony_ci      value: string | Buffer | Uint8Array | number,
86161847f8eSopenharmony_ci      offset?: number,
86261847f8eSopenharmony_ci      end?: number,
86361847f8eSopenharmony_ci      encoding?: BufferEncoding
86461847f8eSopenharmony_ci    ): Buffer;
86561847f8eSopenharmony_ci
86661847f8eSopenharmony_ci    /**
86761847f8eSopenharmony_ci     * Compares buf with target and returns a number indicating whether buf comes before, after,
86861847f8eSopenharmony_ci     * or is the same as target in sort order. Comparison is based on the actual sequence of bytes in each Buffer.
86961847f8eSopenharmony_ci     *
87061847f8eSopenharmony_ci     * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array with which to compare buf
87161847f8eSopenharmony_ci     * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin comparison
87261847f8eSopenharmony_ci     * @param { number } [targetEnd] - targetEnd [targetEnd = target.length] The offset within target at which to end comparison (not inclusive)
87361847f8eSopenharmony_ci     * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf at which to begin comparison
87461847f8eSopenharmony_ci     * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to end comparison (not inclusive)
87561847f8eSopenharmony_ci     * @returns { -1 | 0 | 1 } 0 is returned if target is the same as buf
87661847f8eSopenharmony_ci     *         1 is returned if target should come before buf when sorted.
87761847f8eSopenharmony_ci     *        -1 is returned if target should come after buf when sorted.
87861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
87961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
88061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
88161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[targetStart/targetEnd/sourceStart/sourceEnd]" is out of range.
88261847f8eSopenharmony_ci     *         It must be >= 0 and <= [right range]. Received value is: [targetStart/targetEnd/sourceStart/sourceEnd]
88361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
88461847f8eSopenharmony_ci     * @since 9
88561847f8eSopenharmony_ci     */
88661847f8eSopenharmony_ci    /**
88761847f8eSopenharmony_ci     * Compares buf with target and returns a number indicating whether buf comes before, after,
88861847f8eSopenharmony_ci     * or is the same as target in sort order. Comparison is based on the actual sequence of bytes in each Buffer.
88961847f8eSopenharmony_ci     *
89061847f8eSopenharmony_ci     * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array with which to compare buf
89161847f8eSopenharmony_ci     * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin comparison
89261847f8eSopenharmony_ci     * @param { number } [targetEnd] - targetEnd [targetEnd = target.length] The offset within target at which to end comparison (not inclusive)
89361847f8eSopenharmony_ci     * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf at which to begin comparison
89461847f8eSopenharmony_ci     * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to end comparison (not inclusive)
89561847f8eSopenharmony_ci     * @returns { -1 | 0 | 1 } 0 is returned if target is the same as buf
89661847f8eSopenharmony_ci     *         1 is returned if target should come before buf when sorted.
89761847f8eSopenharmony_ci     *        -1 is returned if target should come after buf when sorted.
89861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
89961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
90061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
90161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[targetStart/targetEnd/sourceStart/sourceEnd]" is out of range.
90261847f8eSopenharmony_ci     *         It must be >= 0 and <= [right range]. Received value is: [targetStart/targetEnd/sourceStart/sourceEnd]
90361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
90461847f8eSopenharmony_ci     * @crossplatform
90561847f8eSopenharmony_ci     * @since 10
90661847f8eSopenharmony_ci     */
90761847f8eSopenharmony_ci    /**
90861847f8eSopenharmony_ci     * Compares buf with target and returns a number indicating whether buf comes before, after,
90961847f8eSopenharmony_ci     * or is the same as target in sort order. Comparison is based on the actual sequence of bytes in each Buffer.
91061847f8eSopenharmony_ci     *
91161847f8eSopenharmony_ci     * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array with which to compare buf
91261847f8eSopenharmony_ci     * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin comparison
91361847f8eSopenharmony_ci     * @param { number } [targetEnd] - targetEnd [targetEnd = target.length] The offset within target at which to end comparison (not inclusive)
91461847f8eSopenharmony_ci     * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf at which to begin comparison
91561847f8eSopenharmony_ci     * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to end comparison (not inclusive)
91661847f8eSopenharmony_ci     * @returns { -1 | 0 | 1 } 0 is returned if target is the same as buf
91761847f8eSopenharmony_ci     *         1 is returned if target should come before buf when sorted.
91861847f8eSopenharmony_ci     *        -1 is returned if target should come after buf when sorted.
91961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
92061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
92161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
92261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[targetStart/targetEnd/sourceStart/sourceEnd]" is out of range.
92361847f8eSopenharmony_ci     *         It must be >= 0 and <= [right range]. Received value is: [targetStart/targetEnd/sourceStart/sourceEnd]
92461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
92561847f8eSopenharmony_ci     * @crossplatform
92661847f8eSopenharmony_ci     * @atomicservice
92761847f8eSopenharmony_ci     * @since 11
92861847f8eSopenharmony_ci     */
92961847f8eSopenharmony_ci    compare(
93061847f8eSopenharmony_ci      target: Buffer | Uint8Array,
93161847f8eSopenharmony_ci      targetStart?: number,
93261847f8eSopenharmony_ci      targetEnd?: number,
93361847f8eSopenharmony_ci      sourceStart?: number,
93461847f8eSopenharmony_ci      sourceEnd?: number
93561847f8eSopenharmony_ci    ): -1 | 0 | 1;
93661847f8eSopenharmony_ci
93761847f8eSopenharmony_ci    /**
93861847f8eSopenharmony_ci     * Copies data from a region of buf to a region in target, even if the target memory region overlaps with buf.
93961847f8eSopenharmony_ci     * If sourceEnd is greater than the length of the target, the length of the target shall prevail, and the extra part will not be overwritten.
94061847f8eSopenharmony_ci     *
94161847f8eSopenharmony_ci     * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array to copy into
94261847f8eSopenharmony_ci     * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin writing
94361847f8eSopenharmony_ci     * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf from which to begin copying
94461847f8eSopenharmony_ci     * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to stop copying (not inclusive)
94561847f8eSopenharmony_ci     * @returns { number } The number of bytes copied
94661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
94761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
94861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
94961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[targetStart/sourceStart/sourceEnd]" is out of range. It must be >= 0.
95061847f8eSopenharmony_ci     *                                    Received value is: [targetStart/sourceStart/sourceEnd]
95161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
95261847f8eSopenharmony_ci     * @since 9
95361847f8eSopenharmony_ci     */
95461847f8eSopenharmony_ci    /**
95561847f8eSopenharmony_ci     * Copies data from a region of buf to a region in target, even if the target memory region overlaps with buf.
95661847f8eSopenharmony_ci     * If sourceEnd is greater than the length of the target, the length of the target shall prevail, and the extra part will not be overwritten.
95761847f8eSopenharmony_ci     *
95861847f8eSopenharmony_ci     * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array to copy into
95961847f8eSopenharmony_ci     * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin writing
96061847f8eSopenharmony_ci     * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf from which to begin copying
96161847f8eSopenharmony_ci     * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to stop copying (not inclusive)
96261847f8eSopenharmony_ci     * @returns { number } The number of bytes copied
96361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
96461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
96561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
96661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[targetStart/sourceStart/sourceEnd]" is out of range. It must be >= 0.
96761847f8eSopenharmony_ci     *                                    Received value is: [targetStart/sourceStart/sourceEnd]
96861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
96961847f8eSopenharmony_ci     * @crossplatform
97061847f8eSopenharmony_ci     * @since 10
97161847f8eSopenharmony_ci     */
97261847f8eSopenharmony_ci    /**
97361847f8eSopenharmony_ci     * Copies data from a region of buf to a region in target, even if the target memory region overlaps with buf.
97461847f8eSopenharmony_ci     * If sourceEnd is greater than the length of the target, the length of the target shall prevail, and the extra part will not be overwritten.
97561847f8eSopenharmony_ci     *
97661847f8eSopenharmony_ci     * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array to copy into
97761847f8eSopenharmony_ci     * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin writing
97861847f8eSopenharmony_ci     * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf from which to begin copying
97961847f8eSopenharmony_ci     * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to stop copying (not inclusive)
98061847f8eSopenharmony_ci     * @returns { number } The number of bytes copied
98161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
98261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
98361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
98461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[targetStart/sourceStart/sourceEnd]" is out of range. It must be >= 0.
98561847f8eSopenharmony_ci     *                                    Received value is: [targetStart/sourceStart/sourceEnd]
98661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
98761847f8eSopenharmony_ci     * @crossplatform
98861847f8eSopenharmony_ci     * @atomicservice
98961847f8eSopenharmony_ci     * @since 11
99061847f8eSopenharmony_ci     */
99161847f8eSopenharmony_ci    copy(target: Buffer | Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
99261847f8eSopenharmony_ci
99361847f8eSopenharmony_ci    /**
99461847f8eSopenharmony_ci     * Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise
99561847f8eSopenharmony_ci     *
99661847f8eSopenharmony_ci     * @param { Uint8Array | Buffer } otherBuffer - otherBuffer otherBuffer A Buffer or Uint8Array with which to compare buf
99761847f8eSopenharmony_ci     * @returns { boolean } true or false
99861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
99961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
100061847f8eSopenharmony_ci     * @since 9
100161847f8eSopenharmony_ci     */
100261847f8eSopenharmony_ci    /**
100361847f8eSopenharmony_ci     * Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise
100461847f8eSopenharmony_ci     *
100561847f8eSopenharmony_ci     * @param { Uint8Array | Buffer } otherBuffer - otherBuffer otherBuffer A Buffer or Uint8Array with which to compare buf
100661847f8eSopenharmony_ci     * @returns { boolean } true or false
100761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
100861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
100961847f8eSopenharmony_ci     * @crossplatform
101061847f8eSopenharmony_ci     * @since 10
101161847f8eSopenharmony_ci     */
101261847f8eSopenharmony_ci    /**
101361847f8eSopenharmony_ci     * Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise
101461847f8eSopenharmony_ci     *
101561847f8eSopenharmony_ci     * @param { Uint8Array | Buffer } otherBuffer - otherBuffer otherBuffer A Buffer or Uint8Array with which to compare buf
101661847f8eSopenharmony_ci     * @returns { boolean } true or false
101761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
101861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
101961847f8eSopenharmony_ci     * @crossplatform
102061847f8eSopenharmony_ci     * @atomicservice
102161847f8eSopenharmony_ci     * @since 11
102261847f8eSopenharmony_ci     */
102361847f8eSopenharmony_ci    equals(otherBuffer: Uint8Array | Buffer): boolean;
102461847f8eSopenharmony_ci
102561847f8eSopenharmony_ci    /**
102661847f8eSopenharmony_ci     * Returns true if value was found in buf, false otherwise
102761847f8eSopenharmony_ci     *
102861847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
102961847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf. If negative, then offset is calculated from the end of buf
103061847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string, this is its encoding
103161847f8eSopenharmony_ci     * @returns { boolean } true or false
103261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
103361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
103461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
103561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
103661847f8eSopenharmony_ci     * @since 9
103761847f8eSopenharmony_ci     */
103861847f8eSopenharmony_ci    /**
103961847f8eSopenharmony_ci     * Returns true if value was found in buf, false otherwise
104061847f8eSopenharmony_ci     *
104161847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
104261847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf. If negative, then offset is calculated from the end of buf
104361847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string, this is its encoding
104461847f8eSopenharmony_ci     * @returns { boolean } true or false
104561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
104661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
104761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
104861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
104961847f8eSopenharmony_ci     * @crossplatform
105061847f8eSopenharmony_ci     * @since 10
105161847f8eSopenharmony_ci     */
105261847f8eSopenharmony_ci    /**
105361847f8eSopenharmony_ci     * Returns true if value was found in buf, false otherwise
105461847f8eSopenharmony_ci     *
105561847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
105661847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf. If negative, then offset is calculated from the end of buf
105761847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string, this is its encoding
105861847f8eSopenharmony_ci     * @returns { boolean } true or false
105961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
106061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
106161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
106261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
106361847f8eSopenharmony_ci     * @crossplatform
106461847f8eSopenharmony_ci     * @atomicservice
106561847f8eSopenharmony_ci     * @since 11
106661847f8eSopenharmony_ci     */
106761847f8eSopenharmony_ci    includes(value: string | number | Buffer | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): boolean;
106861847f8eSopenharmony_ci
106961847f8eSopenharmony_ci    /**
107061847f8eSopenharmony_ci     * The index of the first occurrence of value in buf
107161847f8eSopenharmony_ci     *
107261847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
107361847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf
107461847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string,
107561847f8eSopenharmony_ci     * this is the encoding used to determine the binary representation of the string that will be searched for in buf
107661847f8eSopenharmony_ci     * @returns { number } The index of the first occurrence of value in buf, or -1 if buf does not contain value
107761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
107861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
107961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
108061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
108161847f8eSopenharmony_ci     * @since 9
108261847f8eSopenharmony_ci     */
108361847f8eSopenharmony_ci    /**
108461847f8eSopenharmony_ci     * The index of the first occurrence of value in buf
108561847f8eSopenharmony_ci     *
108661847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
108761847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf
108861847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string,
108961847f8eSopenharmony_ci     * this is the encoding used to determine the binary representation of the string that will be searched for in buf
109061847f8eSopenharmony_ci     * @returns { number } The index of the first occurrence of value in buf, or -1 if buf does not contain value
109161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
109261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
109361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
109461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
109561847f8eSopenharmony_ci     * @crossplatform
109661847f8eSopenharmony_ci     * @since 10
109761847f8eSopenharmony_ci     */
109861847f8eSopenharmony_ci    /**
109961847f8eSopenharmony_ci     * The index of the first occurrence of value in buf
110061847f8eSopenharmony_ci     *
110161847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
110261847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf
110361847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string,
110461847f8eSopenharmony_ci     * this is the encoding used to determine the binary representation of the string that will be searched for in buf
110561847f8eSopenharmony_ci     * @returns { number } The index of the first occurrence of value in buf, or -1 if buf does not contain value
110661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
110761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
110861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
110961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
111061847f8eSopenharmony_ci     * @crossplatform
111161847f8eSopenharmony_ci     * @atomicservice
111261847f8eSopenharmony_ci     * @since 11
111361847f8eSopenharmony_ci     */
111461847f8eSopenharmony_ci    indexOf(value: string | number | Buffer | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
111561847f8eSopenharmony_ci
111661847f8eSopenharmony_ci    /**
111761847f8eSopenharmony_ci     * Creates and returns an iterator of buf keys (indices).
111861847f8eSopenharmony_ci     *
111961847f8eSopenharmony_ci     * @returns { IterableIterator<number> }
112061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
112161847f8eSopenharmony_ci     * @since 9
112261847f8eSopenharmony_ci     */
112361847f8eSopenharmony_ci    /**
112461847f8eSopenharmony_ci     * Creates and returns an iterator of buf keys (indices).
112561847f8eSopenharmony_ci     *
112661847f8eSopenharmony_ci     * @returns { IterableIterator<number> }
112761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
112861847f8eSopenharmony_ci     * @crossplatform
112961847f8eSopenharmony_ci     * @since 10
113061847f8eSopenharmony_ci     */
113161847f8eSopenharmony_ci    /**
113261847f8eSopenharmony_ci     * Creates and returns an iterator of buf keys (indices).
113361847f8eSopenharmony_ci     *
113461847f8eSopenharmony_ci     * @returns { IterableIterator<number> }
113561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
113661847f8eSopenharmony_ci     * @crossplatform
113761847f8eSopenharmony_ci     * @atomicservice
113861847f8eSopenharmony_ci     * @since 11
113961847f8eSopenharmony_ci     */
114061847f8eSopenharmony_ci    keys(): IterableIterator<number>;
114161847f8eSopenharmony_ci
114261847f8eSopenharmony_ci    /**
114361847f8eSopenharmony_ci     * Creates and returns an iterator for buf values (bytes).
114461847f8eSopenharmony_ci     *
114561847f8eSopenharmony_ci     * @returns { IterableIterator<number> }
114661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
114761847f8eSopenharmony_ci     * @since 9
114861847f8eSopenharmony_ci     */
114961847f8eSopenharmony_ci    /**
115061847f8eSopenharmony_ci     * Creates and returns an iterator for buf values (bytes).
115161847f8eSopenharmony_ci     *
115261847f8eSopenharmony_ci     * @returns { IterableIterator<number> }
115361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
115461847f8eSopenharmony_ci     * @crossplatform
115561847f8eSopenharmony_ci     * @since 10
115661847f8eSopenharmony_ci     */
115761847f8eSopenharmony_ci    /**
115861847f8eSopenharmony_ci     * Creates and returns an iterator for buf values (bytes).
115961847f8eSopenharmony_ci     *
116061847f8eSopenharmony_ci     * @returns { IterableIterator<number> }
116161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
116261847f8eSopenharmony_ci     * @crossplatform
116361847f8eSopenharmony_ci     * @atomicservice
116461847f8eSopenharmony_ci     * @since 11
116561847f8eSopenharmony_ci     */
116661847f8eSopenharmony_ci    values(): IterableIterator<number>;
116761847f8eSopenharmony_ci
116861847f8eSopenharmony_ci    /**
116961847f8eSopenharmony_ci     * Creates and returns an iterator of [index, byte] pairs from the contents of buf.
117061847f8eSopenharmony_ci     *
117161847f8eSopenharmony_ci     * @returns { IterableIterator<[number, number]> }
117261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
117361847f8eSopenharmony_ci     * @since 9
117461847f8eSopenharmony_ci     */
117561847f8eSopenharmony_ci    /**
117661847f8eSopenharmony_ci     * Creates and returns an iterator of [index, byte] pairs from the contents of buf.
117761847f8eSopenharmony_ci     *
117861847f8eSopenharmony_ci     * @returns { IterableIterator<[number, number]> }
117961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
118061847f8eSopenharmony_ci     * @crossplatform
118161847f8eSopenharmony_ci     * @since 10
118261847f8eSopenharmony_ci     */
118361847f8eSopenharmony_ci    /**
118461847f8eSopenharmony_ci     * Creates and returns an iterator of [index, byte] pairs from the contents of buf.
118561847f8eSopenharmony_ci     *
118661847f8eSopenharmony_ci     * @returns { IterableIterator<[number, number]> }
118761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
118861847f8eSopenharmony_ci     * @crossplatform
118961847f8eSopenharmony_ci     * @atomicservice
119061847f8eSopenharmony_ci     * @since 11
119161847f8eSopenharmony_ci     */
119261847f8eSopenharmony_ci    entries(): IterableIterator<[number, number]>;
119361847f8eSopenharmony_ci
119461847f8eSopenharmony_ci    /**
119561847f8eSopenharmony_ci     * The index of the last occurrence of value in buf
119661847f8eSopenharmony_ci     *
119761847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
119861847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf
119961847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string,
120061847f8eSopenharmony_ci     * this is the encoding used to determine the binary representation of the string that will be searched for in buf
120161847f8eSopenharmony_ci     * @returns { number } The index of the last occurrence of value in buf, or -1 if buf does not contain value
120261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
120361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
120461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
120561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
120661847f8eSopenharmony_ci     * @since 9
120761847f8eSopenharmony_ci     */
120861847f8eSopenharmony_ci    /**
120961847f8eSopenharmony_ci     * The index of the last occurrence of value in buf
121061847f8eSopenharmony_ci     *
121161847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
121261847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf
121361847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string,
121461847f8eSopenharmony_ci     * this is the encoding used to determine the binary representation of the string that will be searched for in buf
121561847f8eSopenharmony_ci     * @returns { number } The index of the last occurrence of value in buf, or -1 if buf does not contain value
121661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
121761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
121861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
121961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
122061847f8eSopenharmony_ci     * @crossplatform
122161847f8eSopenharmony_ci     * @since 10
122261847f8eSopenharmony_ci     */
122361847f8eSopenharmony_ci    /**
122461847f8eSopenharmony_ci     * The index of the last occurrence of value in buf
122561847f8eSopenharmony_ci     *
122661847f8eSopenharmony_ci     * @param { string | number | Buffer | Uint8Array } value - value value What to search for
122761847f8eSopenharmony_ci     * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Where to begin searching in buf
122861847f8eSopenharmony_ci     * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] If value is a string,
122961847f8eSopenharmony_ci     * this is the encoding used to determine the binary representation of the string that will be searched for in buf
123061847f8eSopenharmony_ci     * @returns { number } The index of the last occurrence of value in buf, or -1 if buf does not contain value
123161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
123261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
123361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
123461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
123561847f8eSopenharmony_ci     * @crossplatform
123661847f8eSopenharmony_ci     * @atomicservice
123761847f8eSopenharmony_ci     * @since 11
123861847f8eSopenharmony_ci     */
123961847f8eSopenharmony_ci    lastIndexOf(value: string | number | Buffer | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
124061847f8eSopenharmony_ci
124161847f8eSopenharmony_ci    /**
124261847f8eSopenharmony_ci     * Reads a signed, big-endian 64-bit integer from buf at the specified offset
124361847f8eSopenharmony_ci     *
124461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
124561847f8eSopenharmony_ci     * @returns { bigint } Return a signed, big-endian 64-bit integer
124661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
124761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
124861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
124961847f8eSopenharmony_ci     * @since 9
125061847f8eSopenharmony_ci     */
125161847f8eSopenharmony_ci    /**
125261847f8eSopenharmony_ci     * Reads a signed, big-endian 64-bit integer from buf at the specified offset
125361847f8eSopenharmony_ci     *
125461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
125561847f8eSopenharmony_ci     * @returns { bigint } Return a signed, big-endian 64-bit integer
125661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
125761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
125861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
125961847f8eSopenharmony_ci     * @crossplatform
126061847f8eSopenharmony_ci     * @since 10
126161847f8eSopenharmony_ci     */
126261847f8eSopenharmony_ci    /**
126361847f8eSopenharmony_ci     * Reads a signed, big-endian 64-bit integer from buf at the specified offset
126461847f8eSopenharmony_ci     *
126561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
126661847f8eSopenharmony_ci     * @returns { bigint } Return a signed, big-endian 64-bit integer
126761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
126861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
126961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
127061847f8eSopenharmony_ci     * @crossplatform
127161847f8eSopenharmony_ci     * @atomicservice
127261847f8eSopenharmony_ci     * @since 11
127361847f8eSopenharmony_ci     */
127461847f8eSopenharmony_ci    readBigInt64BE(offset?: number): bigint;
127561847f8eSopenharmony_ci
127661847f8eSopenharmony_ci    /**
127761847f8eSopenharmony_ci     * Reads a signed, little-endian 64-bit integer from buf at the specified offset
127861847f8eSopenharmony_ci     *
127961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
128061847f8eSopenharmony_ci     * @returns { bigint } Return a signed, little-endian 64-bit integer
128161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
128261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
128361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
128461847f8eSopenharmony_ci     * @since 9
128561847f8eSopenharmony_ci     */
128661847f8eSopenharmony_ci    /**
128761847f8eSopenharmony_ci     * Reads a signed, little-endian 64-bit integer from buf at the specified offset
128861847f8eSopenharmony_ci     *
128961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
129061847f8eSopenharmony_ci     * @returns { bigint } Return a signed, little-endian 64-bit integer
129161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
129261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
129361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
129461847f8eSopenharmony_ci     * @crossplatform
129561847f8eSopenharmony_ci     * @since 10
129661847f8eSopenharmony_ci     */
129761847f8eSopenharmony_ci    /**
129861847f8eSopenharmony_ci     * Reads a signed, little-endian 64-bit integer from buf at the specified offset
129961847f8eSopenharmony_ci     *
130061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
130161847f8eSopenharmony_ci     * @returns { bigint } Return a signed, little-endian 64-bit integer
130261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
130361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
130461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
130561847f8eSopenharmony_ci     * @crossplatform
130661847f8eSopenharmony_ci     * @atomicservice
130761847f8eSopenharmony_ci     * @since 11
130861847f8eSopenharmony_ci     */
130961847f8eSopenharmony_ci    readBigInt64LE(offset?: number): bigint;
131061847f8eSopenharmony_ci
131161847f8eSopenharmony_ci    /**
131261847f8eSopenharmony_ci     * Reads a unsigned, big-endian 64-bit integer from buf at the specified offset
131361847f8eSopenharmony_ci     *
131461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
131561847f8eSopenharmony_ci     * @returns { bigint } Return a unsigned, big-endian 64-bit integer
131661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
131761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
131861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
131961847f8eSopenharmony_ci     * @since 9
132061847f8eSopenharmony_ci     */
132161847f8eSopenharmony_ci    /**
132261847f8eSopenharmony_ci     * Reads a unsigned, big-endian 64-bit integer from buf at the specified offset
132361847f8eSopenharmony_ci     *
132461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
132561847f8eSopenharmony_ci     * @returns { bigint } Return a unsigned, big-endian 64-bit integer
132661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
132761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
132861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
132961847f8eSopenharmony_ci     * @crossplatform
133061847f8eSopenharmony_ci     * @since 10
133161847f8eSopenharmony_ci     */
133261847f8eSopenharmony_ci    /**
133361847f8eSopenharmony_ci     * Reads a unsigned, big-endian 64-bit integer from buf at the specified offset
133461847f8eSopenharmony_ci     *
133561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
133661847f8eSopenharmony_ci     * @returns { bigint } Return a unsigned, big-endian 64-bit integer
133761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
133861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
133961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
134061847f8eSopenharmony_ci     * @crossplatform
134161847f8eSopenharmony_ci     * @atomicservice
134261847f8eSopenharmony_ci     * @since 11
134361847f8eSopenharmony_ci     */
134461847f8eSopenharmony_ci    readBigUInt64BE(offset?: number): bigint;
134561847f8eSopenharmony_ci
134661847f8eSopenharmony_ci    /**
134761847f8eSopenharmony_ci     * Reads a unsigned, little-endian 64-bit integer from buf at the specified offset
134861847f8eSopenharmony_ci     *
134961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
135061847f8eSopenharmony_ci     * @returns { bigint } Return a unsigned, little-endian 64-bit integer
135161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
135261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
135361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
135461847f8eSopenharmony_ci     * @since 9
135561847f8eSopenharmony_ci     */
135661847f8eSopenharmony_ci    /**
135761847f8eSopenharmony_ci     * Reads a unsigned, little-endian 64-bit integer from buf at the specified offset
135861847f8eSopenharmony_ci     *
135961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
136061847f8eSopenharmony_ci     * @returns { bigint } Return a unsigned, little-endian 64-bit integer
136161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
136261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
136361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
136461847f8eSopenharmony_ci     * @crossplatform
136561847f8eSopenharmony_ci     * @since 10
136661847f8eSopenharmony_ci     */
136761847f8eSopenharmony_ci    /**
136861847f8eSopenharmony_ci     * Reads a unsigned, little-endian 64-bit integer from buf at the specified offset
136961847f8eSopenharmony_ci     *
137061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
137161847f8eSopenharmony_ci     * @returns { bigint } Return a unsigned, little-endian 64-bit integer
137261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
137361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
137461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
137561847f8eSopenharmony_ci     * @crossplatform
137661847f8eSopenharmony_ci     * @atomicservice
137761847f8eSopenharmony_ci     * @since 11
137861847f8eSopenharmony_ci     */
137961847f8eSopenharmony_ci    readBigUInt64LE(offset?: number): bigint;
138061847f8eSopenharmony_ci
138161847f8eSopenharmony_ci    /**
138261847f8eSopenharmony_ci     * Reads a 64-bit, big-endian double from buf at the specified offset
138361847f8eSopenharmony_ci     *
138461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
138561847f8eSopenharmony_ci     * @returns { number } Return a 64-bit, big-endian double
138661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
138761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
138861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
138961847f8eSopenharmony_ci     * @since 9
139061847f8eSopenharmony_ci     */
139161847f8eSopenharmony_ci    /**
139261847f8eSopenharmony_ci     * Reads a 64-bit, big-endian double from buf at the specified offset
139361847f8eSopenharmony_ci     *
139461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
139561847f8eSopenharmony_ci     * @returns { number } Return a 64-bit, big-endian double
139661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
139761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
139861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
139961847f8eSopenharmony_ci     * @crossplatform
140061847f8eSopenharmony_ci     * @since 10
140161847f8eSopenharmony_ci     */
140261847f8eSopenharmony_ci    /**
140361847f8eSopenharmony_ci     * Reads a 64-bit, big-endian double from buf at the specified offset
140461847f8eSopenharmony_ci     *
140561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
140661847f8eSopenharmony_ci     * @returns { number } Return a 64-bit, big-endian double
140761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
140861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
140961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
141061847f8eSopenharmony_ci     * @crossplatform
141161847f8eSopenharmony_ci     * @atomicservice
141261847f8eSopenharmony_ci     * @since 11
141361847f8eSopenharmony_ci     */
141461847f8eSopenharmony_ci    readDoubleBE(offset?: number): number;
141561847f8eSopenharmony_ci
141661847f8eSopenharmony_ci    /**
141761847f8eSopenharmony_ci     * Reads a 64-bit, little-endian double from buf at the specified offset
141861847f8eSopenharmony_ci     *
141961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
142061847f8eSopenharmony_ci     * @returns { number } Return a 64-bit, little-endian double
142161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
142261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
142361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
142461847f8eSopenharmony_ci     * @since 9
142561847f8eSopenharmony_ci     */
142661847f8eSopenharmony_ci    /**
142761847f8eSopenharmony_ci     * Reads a 64-bit, little-endian double from buf at the specified offset
142861847f8eSopenharmony_ci     *
142961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
143061847f8eSopenharmony_ci     * @returns { number } Return a 64-bit, little-endian double
143161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
143261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
143361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
143461847f8eSopenharmony_ci     * @crossplatform
143561847f8eSopenharmony_ci     * @since 10
143661847f8eSopenharmony_ci     */
143761847f8eSopenharmony_ci    /**
143861847f8eSopenharmony_ci     * Reads a 64-bit, little-endian double from buf at the specified offset
143961847f8eSopenharmony_ci     *
144061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 8
144161847f8eSopenharmony_ci     * @returns { number } Return a 64-bit, little-endian double
144261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
144361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
144461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
144561847f8eSopenharmony_ci     * @crossplatform
144661847f8eSopenharmony_ci     * @atomicservice
144761847f8eSopenharmony_ci     * @since 11
144861847f8eSopenharmony_ci     */
144961847f8eSopenharmony_ci    readDoubleLE(offset?: number): number;
145061847f8eSopenharmony_ci
145161847f8eSopenharmony_ci    /**
145261847f8eSopenharmony_ci     * Reads a 32-bit, big-endian float from buf at the specified offset
145361847f8eSopenharmony_ci     *
145461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
145561847f8eSopenharmony_ci     * @returns { number } Return a 32-bit, big-endian float
145661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
145761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
145861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
145961847f8eSopenharmony_ci     * @since 9
146061847f8eSopenharmony_ci     */
146161847f8eSopenharmony_ci    /**
146261847f8eSopenharmony_ci     * Reads a 32-bit, big-endian float from buf at the specified offset
146361847f8eSopenharmony_ci     *
146461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
146561847f8eSopenharmony_ci     * @returns { number } Return a 32-bit, big-endian float
146661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
146761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
146861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
146961847f8eSopenharmony_ci     * @crossplatform
147061847f8eSopenharmony_ci     * @since 10
147161847f8eSopenharmony_ci     */
147261847f8eSopenharmony_ci    /**
147361847f8eSopenharmony_ci     * Reads a 32-bit, big-endian float from buf at the specified offset
147461847f8eSopenharmony_ci     *
147561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
147661847f8eSopenharmony_ci     * @returns { number } Return a 32-bit, big-endian float
147761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
147861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
147961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
148061847f8eSopenharmony_ci     * @crossplatform
148161847f8eSopenharmony_ci     * @atomicservice
148261847f8eSopenharmony_ci     * @since 11
148361847f8eSopenharmony_ci     */
148461847f8eSopenharmony_ci    readFloatBE(offset?: number): number;
148561847f8eSopenharmony_ci
148661847f8eSopenharmony_ci    /**
148761847f8eSopenharmony_ci     * Reads a 32-bit, little-endian float from buf at the specified offset
148861847f8eSopenharmony_ci     *
148961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
149061847f8eSopenharmony_ci     * @returns { number } Return a 32-bit, little-endian float
149161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
149261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
149361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
149461847f8eSopenharmony_ci     * @since 9
149561847f8eSopenharmony_ci     */
149661847f8eSopenharmony_ci    /**
149761847f8eSopenharmony_ci     * Reads a 32-bit, little-endian float from buf at the specified offset
149861847f8eSopenharmony_ci     *
149961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
150061847f8eSopenharmony_ci     * @returns { number } Return a 32-bit, little-endian float
150161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
150261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
150361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
150461847f8eSopenharmony_ci     * @crossplatform
150561847f8eSopenharmony_ci     * @since 10
150661847f8eSopenharmony_ci     */
150761847f8eSopenharmony_ci    /**
150861847f8eSopenharmony_ci     * Reads a 32-bit, little-endian float from buf at the specified offset
150961847f8eSopenharmony_ci     *
151061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
151161847f8eSopenharmony_ci     * @returns { number } Return a 32-bit, little-endian float
151261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
151361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
151461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
151561847f8eSopenharmony_ci     * @crossplatform
151661847f8eSopenharmony_ci     * @atomicservice
151761847f8eSopenharmony_ci     * @since 11
151861847f8eSopenharmony_ci     */
151961847f8eSopenharmony_ci    readFloatLE(offset?: number): number;
152061847f8eSopenharmony_ci
152161847f8eSopenharmony_ci    /**
152261847f8eSopenharmony_ci     * Reads a signed 8-bit integer from buf at the specified offset
152361847f8eSopenharmony_ci     *
152461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 1
152561847f8eSopenharmony_ci     * @returns { number } Return a signed 8-bit integer
152661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
152761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset]
152861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
152961847f8eSopenharmony_ci     * @since 9
153061847f8eSopenharmony_ci     */
153161847f8eSopenharmony_ci    /**
153261847f8eSopenharmony_ci     * Reads a signed 8-bit integer from buf at the specified offset
153361847f8eSopenharmony_ci     *
153461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 1
153561847f8eSopenharmony_ci     * @returns { number } Return a signed 8-bit integer
153661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
153761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset]
153861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
153961847f8eSopenharmony_ci     * @crossplatform
154061847f8eSopenharmony_ci     * @since 10
154161847f8eSopenharmony_ci     */
154261847f8eSopenharmony_ci    /**
154361847f8eSopenharmony_ci     * Reads a signed 8-bit integer from buf at the specified offset
154461847f8eSopenharmony_ci     *
154561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 1
154661847f8eSopenharmony_ci     * @returns { number } Return a signed 8-bit integer
154761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
154861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset]
154961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
155061847f8eSopenharmony_ci     * @crossplatform
155161847f8eSopenharmony_ci     * @atomicservice
155261847f8eSopenharmony_ci     * @since 11
155361847f8eSopenharmony_ci     */
155461847f8eSopenharmony_ci    readInt8(offset?: number): number;
155561847f8eSopenharmony_ci
155661847f8eSopenharmony_ci    /**
155761847f8eSopenharmony_ci     * Reads a signed, big-endian 16-bit integer from buf at the specified offset
155861847f8eSopenharmony_ci     *
155961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 2
156061847f8eSopenharmony_ci     * @returns { number } Return a signed, big-endian 16-bit integer
156161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
156261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
156361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
156461847f8eSopenharmony_ci     * @since 9
156561847f8eSopenharmony_ci     */
156661847f8eSopenharmony_ci    /**
156761847f8eSopenharmony_ci     * Reads a signed, big-endian 16-bit integer from buf at the specified offset
156861847f8eSopenharmony_ci     *
156961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 2
157061847f8eSopenharmony_ci     * @returns { number } Return a signed, big-endian 16-bit integer
157161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
157261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
157361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
157461847f8eSopenharmony_ci     * @crossplatform
157561847f8eSopenharmony_ci     * @since 10
157661847f8eSopenharmony_ci     */
157761847f8eSopenharmony_ci    /**
157861847f8eSopenharmony_ci     * Reads a signed, big-endian 16-bit integer from buf at the specified offset
157961847f8eSopenharmony_ci     *
158061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 2
158161847f8eSopenharmony_ci     * @returns { number } Return a signed, big-endian 16-bit integer
158261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
158361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
158461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
158561847f8eSopenharmony_ci     * @crossplatform
158661847f8eSopenharmony_ci     * @atomicservice
158761847f8eSopenharmony_ci     * @since 11
158861847f8eSopenharmony_ci     */
158961847f8eSopenharmony_ci    readInt16BE(offset?: number): number;
159061847f8eSopenharmony_ci
159161847f8eSopenharmony_ci    /**
159261847f8eSopenharmony_ci     * Reads a signed, little-endian 16-bit integer from buf at the specified offset
159361847f8eSopenharmony_ci     *
159461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 2
159561847f8eSopenharmony_ci     * @returns { number } Return a signed, little-endian 16-bit integer
159661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
159761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
159861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
159961847f8eSopenharmony_ci     * @since 9
160061847f8eSopenharmony_ci     */
160161847f8eSopenharmony_ci    /**
160261847f8eSopenharmony_ci     * Reads a signed, little-endian 16-bit integer from buf at the specified offset
160361847f8eSopenharmony_ci     *
160461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 2
160561847f8eSopenharmony_ci     * @returns { number } Return a signed, little-endian 16-bit integer
160661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
160761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
160861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
160961847f8eSopenharmony_ci     * @crossplatform
161061847f8eSopenharmony_ci     * @since 10
161161847f8eSopenharmony_ci     */
161261847f8eSopenharmony_ci    /**
161361847f8eSopenharmony_ci     * Reads a signed, little-endian 16-bit integer from buf at the specified offset
161461847f8eSopenharmony_ci     *
161561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 2
161661847f8eSopenharmony_ci     * @returns { number } Return a signed, little-endian 16-bit integer
161761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
161861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
161961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
162061847f8eSopenharmony_ci     * @crossplatform
162161847f8eSopenharmony_ci     * @atomicservice
162261847f8eSopenharmony_ci     * @since 11
162361847f8eSopenharmony_ci     */
162461847f8eSopenharmony_ci    readInt16LE(offset?: number): number;
162561847f8eSopenharmony_ci
162661847f8eSopenharmony_ci    /**
162761847f8eSopenharmony_ci     * Reads a signed, big-endian 32-bit integer from buf at the specified offset
162861847f8eSopenharmony_ci     *
162961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
163061847f8eSopenharmony_ci     * @returns { number } Return a signed, big-endian 32-bit integer
163161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
163261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
163361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
163461847f8eSopenharmony_ci     * @since 9
163561847f8eSopenharmony_ci     */
163661847f8eSopenharmony_ci    /**
163761847f8eSopenharmony_ci     * Reads a signed, big-endian 32-bit integer from buf at the specified offset
163861847f8eSopenharmony_ci     *
163961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
164061847f8eSopenharmony_ci     * @returns { number } Return a signed, big-endian 32-bit integer
164161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
164261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
164361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
164461847f8eSopenharmony_ci     * @crossplatform
164561847f8eSopenharmony_ci     * @since 10
164661847f8eSopenharmony_ci     */
164761847f8eSopenharmony_ci    /**
164861847f8eSopenharmony_ci     * Reads a signed, big-endian 32-bit integer from buf at the specified offset
164961847f8eSopenharmony_ci     *
165061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
165161847f8eSopenharmony_ci     * @returns { number } Return a signed, big-endian 32-bit integer
165261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
165361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
165461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
165561847f8eSopenharmony_ci     * @crossplatform
165661847f8eSopenharmony_ci     * @atomicservice
165761847f8eSopenharmony_ci     * @since 11
165861847f8eSopenharmony_ci     */
165961847f8eSopenharmony_ci    readInt32BE(offset?: number): number;
166061847f8eSopenharmony_ci
166161847f8eSopenharmony_ci    /**
166261847f8eSopenharmony_ci     * Reads a signed, little-endian 32-bit integer from buf at the specified offset
166361847f8eSopenharmony_ci     *
166461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
166561847f8eSopenharmony_ci     * @returns { number } Return a signed, little-endian 32-bit integer
166661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
166761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
166861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
166961847f8eSopenharmony_ci     * @since 9
167061847f8eSopenharmony_ci     */
167161847f8eSopenharmony_ci    /**
167261847f8eSopenharmony_ci     * Reads a signed, little-endian 32-bit integer from buf at the specified offset
167361847f8eSopenharmony_ci     *
167461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
167561847f8eSopenharmony_ci     * @returns { number } Return a signed, little-endian 32-bit integer
167661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
167761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
167861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
167961847f8eSopenharmony_ci     * @crossplatform
168061847f8eSopenharmony_ci     * @since 10
168161847f8eSopenharmony_ci     */
168261847f8eSopenharmony_ci    /**
168361847f8eSopenharmony_ci     * Reads a signed, little-endian 32-bit integer from buf at the specified offset
168461847f8eSopenharmony_ci     *
168561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - 4
168661847f8eSopenharmony_ci     * @returns { number } Return a signed, little-endian 32-bit integer
168761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
168861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
168961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
169061847f8eSopenharmony_ci     * @crossplatform
169161847f8eSopenharmony_ci     * @atomicservice
169261847f8eSopenharmony_ci     * @since 11
169361847f8eSopenharmony_ci     */
169461847f8eSopenharmony_ci    readInt32LE(offset?: number): number;
169561847f8eSopenharmony_ci
169661847f8eSopenharmony_ci    /**
169761847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a big-endian,
169861847f8eSopenharmony_ci     * two's complement signed value supporting up to 48 bits of accuracy
169961847f8eSopenharmony_ci     *
170061847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
170161847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
170261847f8eSopenharmony_ci     * @returns { number }
170361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
170461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
170561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
170661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
170761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
170861847f8eSopenharmony_ci     * @since 9
170961847f8eSopenharmony_ci     */
171061847f8eSopenharmony_ci    /**
171161847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a big-endian,
171261847f8eSopenharmony_ci     * two's complement signed value supporting up to 48 bits of accuracy
171361847f8eSopenharmony_ci     *
171461847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
171561847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
171661847f8eSopenharmony_ci     * @returns { number }
171761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
171861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
171961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
172061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
172161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
172261847f8eSopenharmony_ci     * @crossplatform
172361847f8eSopenharmony_ci     * @since 10
172461847f8eSopenharmony_ci     */
172561847f8eSopenharmony_ci    /**
172661847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a big-endian,
172761847f8eSopenharmony_ci     * two's complement signed value supporting up to 48 bits of accuracy
172861847f8eSopenharmony_ci     *
172961847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
173061847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
173161847f8eSopenharmony_ci     * @returns { number }
173261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
173361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
173461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
173561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
173661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
173761847f8eSopenharmony_ci     * @crossplatform
173861847f8eSopenharmony_ci     * @atomicservice
173961847f8eSopenharmony_ci     * @since 11
174061847f8eSopenharmony_ci     */
174161847f8eSopenharmony_ci    readIntBE(offset: number, byteLength: number): number;
174261847f8eSopenharmony_ci
174361847f8eSopenharmony_ci    /**
174461847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a little-endian,
174561847f8eSopenharmony_ci     * two's complement signed value supporting up to 48 bits of accuracy.
174661847f8eSopenharmony_ci     *
174761847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
174861847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
174961847f8eSopenharmony_ci     * @returns { number }
175061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
175161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
175261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
175361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
175461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
175561847f8eSopenharmony_ci     * @since 9
175661847f8eSopenharmony_ci     */
175761847f8eSopenharmony_ci    /**
175861847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a little-endian,
175961847f8eSopenharmony_ci     * two's complement signed value supporting up to 48 bits of accuracy.
176061847f8eSopenharmony_ci     *
176161847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
176261847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
176361847f8eSopenharmony_ci     * @returns { number }
176461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
176561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
176661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
176761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
176861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
176961847f8eSopenharmony_ci     * @crossplatform
177061847f8eSopenharmony_ci     * @since 10
177161847f8eSopenharmony_ci     */
177261847f8eSopenharmony_ci    /**
177361847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a little-endian,
177461847f8eSopenharmony_ci     * two's complement signed value supporting up to 48 bits of accuracy.
177561847f8eSopenharmony_ci     *
177661847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
177761847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
177861847f8eSopenharmony_ci     * @returns { number }
177961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
178061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
178161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
178261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
178361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
178461847f8eSopenharmony_ci     * @crossplatform
178561847f8eSopenharmony_ci     * @atomicservice
178661847f8eSopenharmony_ci     * @since 11
178761847f8eSopenharmony_ci     */
178861847f8eSopenharmony_ci    readIntLE(offset: number, byteLength: number): number;
178961847f8eSopenharmony_ci
179061847f8eSopenharmony_ci    /**
179161847f8eSopenharmony_ci     * Reads an unsigned 8-bit integer from buf at the specified offset
179261847f8eSopenharmony_ci     *
179361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 1
179461847f8eSopenharmony_ci     * @returns { number } Reads an unsigned 8-bit integer
179561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
179661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset]
179761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
179861847f8eSopenharmony_ci     * @since 9
179961847f8eSopenharmony_ci     */
180061847f8eSopenharmony_ci    /**
180161847f8eSopenharmony_ci     * Reads an unsigned 8-bit integer from buf at the specified offset
180261847f8eSopenharmony_ci     *
180361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 1
180461847f8eSopenharmony_ci     * @returns { number } Reads an unsigned 8-bit integer
180561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
180661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset]
180761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
180861847f8eSopenharmony_ci     * @crossplatform
180961847f8eSopenharmony_ci     * @since 10
181061847f8eSopenharmony_ci     */
181161847f8eSopenharmony_ci    /**
181261847f8eSopenharmony_ci     * Reads an unsigned 8-bit integer from buf at the specified offset
181361847f8eSopenharmony_ci     *
181461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 1
181561847f8eSopenharmony_ci     * @returns { number } Reads an unsigned 8-bit integer
181661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
181761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset]
181861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
181961847f8eSopenharmony_ci     * @crossplatform
182061847f8eSopenharmony_ci     * @atomicservice
182161847f8eSopenharmony_ci     * @since 11
182261847f8eSopenharmony_ci     */
182361847f8eSopenharmony_ci    readUInt8(offset?: number): number;
182461847f8eSopenharmony_ci
182561847f8eSopenharmony_ci    /**
182661847f8eSopenharmony_ci     * Reads an unsigned, big-endian 16-bit integer from buf at the specified offset
182761847f8eSopenharmony_ci     *
182861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 2
182961847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, big-endian 16-bit integer
183061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
183161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
183261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
183361847f8eSopenharmony_ci     * @since 9
183461847f8eSopenharmony_ci     */
183561847f8eSopenharmony_ci    /**
183661847f8eSopenharmony_ci     * Reads an unsigned, big-endian 16-bit integer from buf at the specified offset
183761847f8eSopenharmony_ci     *
183861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 2
183961847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, big-endian 16-bit integer
184061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
184161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
184261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
184361847f8eSopenharmony_ci     * @crossplatform
184461847f8eSopenharmony_ci     * @since 10
184561847f8eSopenharmony_ci     */
184661847f8eSopenharmony_ci    /**
184761847f8eSopenharmony_ci     * Reads an unsigned, big-endian 16-bit integer from buf at the specified offset
184861847f8eSopenharmony_ci     *
184961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 2
185061847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, big-endian 16-bit integer
185161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
185261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
185361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
185461847f8eSopenharmony_ci     * @crossplatform
185561847f8eSopenharmony_ci     * @atomicservice
185661847f8eSopenharmony_ci     * @since 11
185761847f8eSopenharmony_ci     */
185861847f8eSopenharmony_ci    readUInt16BE(offset?: number): number;
185961847f8eSopenharmony_ci
186061847f8eSopenharmony_ci    /**
186161847f8eSopenharmony_ci     * Reads an unsigned, little-endian 16-bit integer from buf at the specified offset
186261847f8eSopenharmony_ci     *
186361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 2
186461847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, little-endian 16-bit integer
186561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
186661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
186761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
186861847f8eSopenharmony_ci     * @since 9
186961847f8eSopenharmony_ci     */
187061847f8eSopenharmony_ci    /**
187161847f8eSopenharmony_ci     * Reads an unsigned, little-endian 16-bit integer from buf at the specified offset
187261847f8eSopenharmony_ci     *
187361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 2
187461847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, little-endian 16-bit integer
187561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
187661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
187761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
187861847f8eSopenharmony_ci     * @crossplatform
187961847f8eSopenharmony_ci     * @since 10
188061847f8eSopenharmony_ci     */
188161847f8eSopenharmony_ci    /**
188261847f8eSopenharmony_ci     * Reads an unsigned, little-endian 16-bit integer from buf at the specified offset
188361847f8eSopenharmony_ci     *
188461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 2
188561847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, little-endian 16-bit integer
188661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
188761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset]
188861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
188961847f8eSopenharmony_ci     * @crossplatform
189061847f8eSopenharmony_ci     * @atomicservice
189161847f8eSopenharmony_ci     * @since 11
189261847f8eSopenharmony_ci     */
189361847f8eSopenharmony_ci    readUInt16LE(offset?: number): number;
189461847f8eSopenharmony_ci
189561847f8eSopenharmony_ci    /**
189661847f8eSopenharmony_ci     * Reads an unsigned, big-endian 32-bit integer from buf at the specified offset
189761847f8eSopenharmony_ci     *
189861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 4
189961847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, big-endian 32-bit integer
190061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
190161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
190261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
190361847f8eSopenharmony_ci     * @since 9
190461847f8eSopenharmony_ci     */
190561847f8eSopenharmony_ci    /**
190661847f8eSopenharmony_ci     * Reads an unsigned, big-endian 32-bit integer from buf at the specified offset
190761847f8eSopenharmony_ci     *
190861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 4
190961847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, big-endian 32-bit integer
191061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
191161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
191261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
191361847f8eSopenharmony_ci     * @crossplatform
191461847f8eSopenharmony_ci     * @since 10
191561847f8eSopenharmony_ci     */
191661847f8eSopenharmony_ci    /**
191761847f8eSopenharmony_ci     * Reads an unsigned, big-endian 32-bit integer from buf at the specified offset
191861847f8eSopenharmony_ci     *
191961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 4
192061847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, big-endian 32-bit integer
192161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
192261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
192361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
192461847f8eSopenharmony_ci     * @crossplatform
192561847f8eSopenharmony_ci     * @atomicservice
192661847f8eSopenharmony_ci     * @since 11
192761847f8eSopenharmony_ci     */
192861847f8eSopenharmony_ci    readUInt32BE(offset?: number): number;
192961847f8eSopenharmony_ci
193061847f8eSopenharmony_ci    /**
193161847f8eSopenharmony_ci     * Reads an unsigned, little-endian 32-bit integer from buf at the specified offset
193261847f8eSopenharmony_ci     *
193361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 4
193461847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, little-endian 32-bit integer
193561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
193661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
193761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
193861847f8eSopenharmony_ci     * @since 9
193961847f8eSopenharmony_ci     */
194061847f8eSopenharmony_ci    /**
194161847f8eSopenharmony_ci     * Reads an unsigned, little-endian 32-bit integer from buf at the specified offset
194261847f8eSopenharmony_ci     *
194361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 4
194461847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, little-endian 32-bit integer
194561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
194661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
194761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
194861847f8eSopenharmony_ci     * @crossplatform
194961847f8eSopenharmony_ci     * @since 10
195061847f8eSopenharmony_ci     */
195161847f8eSopenharmony_ci    /**
195261847f8eSopenharmony_ci     * Reads an unsigned, little-endian 32-bit integer from buf at the specified offset
195361847f8eSopenharmony_ci     *
195461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to read. Must satisfy 0 <= offset <= buf.length - 4
195561847f8eSopenharmony_ci     * @returns { number } Reads an unsigned, little-endian 32-bit integer
195661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
195761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
195861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
195961847f8eSopenharmony_ci     * @crossplatform
196061847f8eSopenharmony_ci     * @atomicservice
196161847f8eSopenharmony_ci     * @since 11
196261847f8eSopenharmony_ci     */
196361847f8eSopenharmony_ci    readUInt32LE(offset?: number): number;
196461847f8eSopenharmony_ci
196561847f8eSopenharmony_ci    /**
196661847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as
196761847f8eSopenharmony_ci     * an unsigned big-endian integer supporting up to 48 bits of accuracy.
196861847f8eSopenharmony_ci     *
196961847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
197061847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
197161847f8eSopenharmony_ci     * @returns { number }
197261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
197361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
197461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
197561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
197661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
197761847f8eSopenharmony_ci     * @since 9
197861847f8eSopenharmony_ci     */
197961847f8eSopenharmony_ci    /**
198061847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as
198161847f8eSopenharmony_ci     * an unsigned big-endian integer supporting up to 48 bits of accuracy.
198261847f8eSopenharmony_ci     *
198361847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
198461847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
198561847f8eSopenharmony_ci     * @returns { number }
198661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
198761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
198861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
198961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
199061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
199161847f8eSopenharmony_ci     * @crossplatform
199261847f8eSopenharmony_ci     * @since 10
199361847f8eSopenharmony_ci     */
199461847f8eSopenharmony_ci    /**
199561847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as
199661847f8eSopenharmony_ci     * an unsigned big-endian integer supporting up to 48 bits of accuracy.
199761847f8eSopenharmony_ci     *
199861847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
199961847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
200061847f8eSopenharmony_ci     * @returns { number }
200161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
200261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
200361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
200461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
200561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
200661847f8eSopenharmony_ci     * @crossplatform
200761847f8eSopenharmony_ci     * @atomicservice
200861847f8eSopenharmony_ci     * @since 11
200961847f8eSopenharmony_ci     */
201061847f8eSopenharmony_ci    readUIntBE(offset: number, byteLength: number): number;
201161847f8eSopenharmony_ci
201261847f8eSopenharmony_ci    /**
201361847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as an unsigned,
201461847f8eSopenharmony_ci     * little-endian integer supporting up to 48 bits of accuracy.
201561847f8eSopenharmony_ci     *
201661847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
201761847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
201861847f8eSopenharmony_ci     * @returns { number }
201961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
202061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
202161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
202261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
202361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
202461847f8eSopenharmony_ci     * @since 9
202561847f8eSopenharmony_ci     */
202661847f8eSopenharmony_ci    /**
202761847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as an unsigned,
202861847f8eSopenharmony_ci     * little-endian integer supporting up to 48 bits of accuracy.
202961847f8eSopenharmony_ci     *
203061847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
203161847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
203261847f8eSopenharmony_ci     * @returns { number }
203361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
203461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
203561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
203661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
203761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
203861847f8eSopenharmony_ci     * @crossplatform
203961847f8eSopenharmony_ci     * @since 10
204061847f8eSopenharmony_ci     */
204161847f8eSopenharmony_ci    /**
204261847f8eSopenharmony_ci     * Reads byteLength number of bytes from buf at the specified offset and interprets the result as an unsigned,
204361847f8eSopenharmony_ci     * little-endian integer supporting up to 48 bits of accuracy.
204461847f8eSopenharmony_ci     *
204561847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to read. Must satisfy: 0 <= offset <= buf.length - byteLength
204661847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to read. Must satisfy 0 < byteLength <= 6
204761847f8eSopenharmony_ci     * @returns { number }
204861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
204961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
205061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
205161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
205261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
205361847f8eSopenharmony_ci     * @crossplatform
205461847f8eSopenharmony_ci     * @atomicservice
205561847f8eSopenharmony_ci     * @since 11
205661847f8eSopenharmony_ci     */
205761847f8eSopenharmony_ci    readUIntLE(offset: number, byteLength: number): number;
205861847f8eSopenharmony_ci
205961847f8eSopenharmony_ci    /**
206061847f8eSopenharmony_ci     * Returns a new Buffer that references the same memory as the original, but offset and cropped by the start and end indices.
206161847f8eSopenharmony_ci     *
206261847f8eSopenharmony_ci     * @param { number } [start] - start [start = 0] Where the new Buffer will start
206361847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] Where the new Buffer will end (not inclusive)
206461847f8eSopenharmony_ci     * @returns { Buffer } Returns a new Buffer that references the same memory as the original
206561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
206661847f8eSopenharmony_ci     * @since 9
206761847f8eSopenharmony_ci     */
206861847f8eSopenharmony_ci    /**
206961847f8eSopenharmony_ci     * Returns a new Buffer that references the same memory as the original, but offset and cropped by the start and end indices.
207061847f8eSopenharmony_ci     *
207161847f8eSopenharmony_ci     * @param { number } [start] - start [start = 0] Where the new Buffer will start
207261847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] Where the new Buffer will end (not inclusive)
207361847f8eSopenharmony_ci     * @returns { Buffer } Returns a new Buffer that references the same memory as the original
207461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
207561847f8eSopenharmony_ci     * @crossplatform
207661847f8eSopenharmony_ci     * @since 10
207761847f8eSopenharmony_ci     */
207861847f8eSopenharmony_ci    /**
207961847f8eSopenharmony_ci     * Returns a new Buffer that references the same memory as the original, but offset and cropped by the start and end indices.
208061847f8eSopenharmony_ci     *
208161847f8eSopenharmony_ci     * @param { number } [start] - start [start = 0] Where the new Buffer will start
208261847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] Where the new Buffer will end (not inclusive)
208361847f8eSopenharmony_ci     * @returns { Buffer } Returns a new Buffer that references the same memory as the original
208461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
208561847f8eSopenharmony_ci     * @crossplatform
208661847f8eSopenharmony_ci     * @atomicservice
208761847f8eSopenharmony_ci     * @since 11
208861847f8eSopenharmony_ci     */
208961847f8eSopenharmony_ci    subarray(start?: number, end?: number): Buffer;
209061847f8eSopenharmony_ci
209161847f8eSopenharmony_ci    /**
209261847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place.
209361847f8eSopenharmony_ci     *
209461847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
209561847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 16-bits
209661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
209761847f8eSopenharmony_ci     * @since 9
209861847f8eSopenharmony_ci     */
209961847f8eSopenharmony_ci    /**
210061847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place.
210161847f8eSopenharmony_ci     *
210261847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
210361847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 16-bits
210461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
210561847f8eSopenharmony_ci     * @crossplatform
210661847f8eSopenharmony_ci     * @since 10
210761847f8eSopenharmony_ci     */
210861847f8eSopenharmony_ci    /**
210961847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place.
211061847f8eSopenharmony_ci     *
211161847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
211261847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 16-bits
211361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
211461847f8eSopenharmony_ci     * @crossplatform
211561847f8eSopenharmony_ci     * @atomicservice
211661847f8eSopenharmony_ci     * @since 11
211761847f8eSopenharmony_ci     */
211861847f8eSopenharmony_ci    swap16(): Buffer;
211961847f8eSopenharmony_ci
212061847f8eSopenharmony_ci    /**
212161847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 32-bit integers and swaps the byte order in-place.
212261847f8eSopenharmony_ci     *
212361847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
212461847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 32-bits
212561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
212661847f8eSopenharmony_ci     * @since 9
212761847f8eSopenharmony_ci     */
212861847f8eSopenharmony_ci    /**
212961847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 32-bit integers and swaps the byte order in-place.
213061847f8eSopenharmony_ci     *
213161847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
213261847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 32-bits
213361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
213461847f8eSopenharmony_ci     * @crossplatform
213561847f8eSopenharmony_ci     * @since 10
213661847f8eSopenharmony_ci     */
213761847f8eSopenharmony_ci    /**
213861847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 32-bit integers and swaps the byte order in-place.
213961847f8eSopenharmony_ci     *
214061847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
214161847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 32-bits
214261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
214361847f8eSopenharmony_ci     * @crossplatform
214461847f8eSopenharmony_ci     * @atomicservice
214561847f8eSopenharmony_ci     * @since 11
214661847f8eSopenharmony_ci     */
214761847f8eSopenharmony_ci    swap32(): Buffer;
214861847f8eSopenharmony_ci
214961847f8eSopenharmony_ci    /**
215061847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 64-bit integers and swaps the byte order in-place.
215161847f8eSopenharmony_ci     *
215261847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
215361847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 64-bits
215461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
215561847f8eSopenharmony_ci     * @since 9
215661847f8eSopenharmony_ci     */
215761847f8eSopenharmony_ci    /**
215861847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 64-bit integers and swaps the byte order in-place.
215961847f8eSopenharmony_ci     *
216061847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
216161847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 64-bits
216261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
216361847f8eSopenharmony_ci     * @crossplatform
216461847f8eSopenharmony_ci     * @since 10
216561847f8eSopenharmony_ci     */
216661847f8eSopenharmony_ci    /**
216761847f8eSopenharmony_ci     * Interprets buf as an array of unsigned 64-bit integers and swaps the byte order in-place.
216861847f8eSopenharmony_ci     *
216961847f8eSopenharmony_ci     * @returns { Buffer } A reference to buf
217061847f8eSopenharmony_ci     * @throws { BusinessError } 10200009 - The buffer size must be a multiple of 64-bits
217161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
217261847f8eSopenharmony_ci     * @crossplatform
217361847f8eSopenharmony_ci     * @atomicservice
217461847f8eSopenharmony_ci     * @since 11
217561847f8eSopenharmony_ci     */
217661847f8eSopenharmony_ci    swap64(): Buffer;
217761847f8eSopenharmony_ci
217861847f8eSopenharmony_ci    /**
217961847f8eSopenharmony_ci     * Returns a JSON representation of buf
218061847f8eSopenharmony_ci     *
218161847f8eSopenharmony_ci     * @returns { Object } Returns a JSON
218261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
218361847f8eSopenharmony_ci     * @since 9
218461847f8eSopenharmony_ci     */
218561847f8eSopenharmony_ci    /**
218661847f8eSopenharmony_ci     * Returns a JSON representation of buf
218761847f8eSopenharmony_ci     *
218861847f8eSopenharmony_ci     * @returns { Object } Returns a JSON
218961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
219061847f8eSopenharmony_ci     * @crossplatform
219161847f8eSopenharmony_ci     * @since 10
219261847f8eSopenharmony_ci     */
219361847f8eSopenharmony_ci    /**
219461847f8eSopenharmony_ci     * Returns a JSON representation of buf
219561847f8eSopenharmony_ci     *
219661847f8eSopenharmony_ci     * @returns { Object } Returns a JSON
219761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
219861847f8eSopenharmony_ci     * @crossplatform
219961847f8eSopenharmony_ci     * @atomicservice
220061847f8eSopenharmony_ci     * @since 11
220161847f8eSopenharmony_ci     */
220261847f8eSopenharmony_ci    toJSON(): Object;
220361847f8eSopenharmony_ci
220461847f8eSopenharmony_ci    /**
220561847f8eSopenharmony_ci     * Decodes buf to a string according to the specified character encoding in encoding
220661847f8eSopenharmony_ci     *
220761847f8eSopenharmony_ci     * @param { string } [encoding] - encoding [encoding='utf8'] The character encoding to use
220861847f8eSopenharmony_ci     * @param { number } [start] - start [start = 0] The byte offset to start decoding at
220961847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] The byte offset to stop decoding at (not inclusive)
221061847f8eSopenharmony_ci     * @returns { string }
221161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
221261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
221361847f8eSopenharmony_ci     * @since 9
221461847f8eSopenharmony_ci     */
221561847f8eSopenharmony_ci    /**
221661847f8eSopenharmony_ci     * Decodes buf to a string according to the specified character encoding in encoding
221761847f8eSopenharmony_ci     *
221861847f8eSopenharmony_ci     * @param { string } [encoding] - encoding [encoding='utf8'] The character encoding to use
221961847f8eSopenharmony_ci     * @param { number } [start] - start [start = 0] The byte offset to start decoding at
222061847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] The byte offset to stop decoding at (not inclusive)
222161847f8eSopenharmony_ci     * @returns { string }
222261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
222361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
222461847f8eSopenharmony_ci     * @crossplatform
222561847f8eSopenharmony_ci     * @since 10
222661847f8eSopenharmony_ci     */
222761847f8eSopenharmony_ci    /**
222861847f8eSopenharmony_ci     * Decodes buf to a string according to the specified character encoding in encoding
222961847f8eSopenharmony_ci     *
223061847f8eSopenharmony_ci     * @param { string } [encoding] - encoding [encoding='utf8'] The character encoding to use
223161847f8eSopenharmony_ci     * @param { number } [start] - start [start = 0] The byte offset to start decoding at
223261847f8eSopenharmony_ci     * @param { number } [end] - end [end = buf.length] The byte offset to stop decoding at (not inclusive)
223361847f8eSopenharmony_ci     * @returns { string }
223461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types.
223561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
223661847f8eSopenharmony_ci     * @crossplatform
223761847f8eSopenharmony_ci     * @atomicservice
223861847f8eSopenharmony_ci     * @since 11
223961847f8eSopenharmony_ci     */
224061847f8eSopenharmony_ci    toString(encoding?: string, start?: number, end?: number): string;
224161847f8eSopenharmony_ci
224261847f8eSopenharmony_ci    /**
224361847f8eSopenharmony_ci     * Writes string to buf at offset according to the character encoding in encoding
224461847f8eSopenharmony_ci     *
224561847f8eSopenharmony_ci     * @param { string } str - str str Writes string to buf at offset according to the character encoding in encoding
224661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write string
224761847f8eSopenharmony_ci     * @param { number } [length] - length [length = buf.length - offset] Maximum number of bytes to write (written bytes will not exceed buf.length - offset)
224861847f8eSopenharmony_ci     * @param { string } [encoding] - encoding [encoding='utf8'] The character encoding of string.
224961847f8eSopenharmony_ci     * @returns { number } Number of bytes written.
225061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
225161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
225261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
225361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[offset/length]" is out of range. It must be >= 0 and <= buf.length. Received value is: [offset/length]
225461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
225561847f8eSopenharmony_ci     * @since 9
225661847f8eSopenharmony_ci     */
225761847f8eSopenharmony_ci    /**
225861847f8eSopenharmony_ci     * Writes string to buf at offset according to the character encoding in encoding
225961847f8eSopenharmony_ci     *
226061847f8eSopenharmony_ci     * @param { string } str - str str Writes string to buf at offset according to the character encoding in encoding
226161847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write string
226261847f8eSopenharmony_ci     * @param { number } [length] - length [length = buf.length - offset] Maximum number of bytes to write (written bytes will not exceed buf.length - offset)
226361847f8eSopenharmony_ci     * @param { string } [encoding] - encoding [encoding='utf8'] The character encoding of string.
226461847f8eSopenharmony_ci     * @returns { number } Number of bytes written.
226561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
226661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
226761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
226861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[offset/length]" is out of range. It must be >= 0 and <= buf.length. Received value is: [offset/length]
226961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
227061847f8eSopenharmony_ci     * @crossplatform
227161847f8eSopenharmony_ci     * @since 10
227261847f8eSopenharmony_ci     */
227361847f8eSopenharmony_ci    /**
227461847f8eSopenharmony_ci     * Writes string to buf at offset according to the character encoding in encoding
227561847f8eSopenharmony_ci     *
227661847f8eSopenharmony_ci     * @param { string } str - str str Writes string to buf at offset according to the character encoding in encoding
227761847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write string
227861847f8eSopenharmony_ci     * @param { number } [length] - length [length = buf.length - offset] Maximum number of bytes to write (written bytes will not exceed buf.length - offset)
227961847f8eSopenharmony_ci     * @param { string } [encoding] - encoding [encoding='utf8'] The character encoding of string.
228061847f8eSopenharmony_ci     * @returns { number } Number of bytes written.
228161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
228261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
228361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
228461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[offset/length]" is out of range. It must be >= 0 and <= buf.length. Received value is: [offset/length]
228561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
228661847f8eSopenharmony_ci     * @crossplatform
228761847f8eSopenharmony_ci     * @atomicservice
228861847f8eSopenharmony_ci     * @since 11
228961847f8eSopenharmony_ci     */
229061847f8eSopenharmony_ci    write(str: string, offset?: number, length?: number, encoding?: string): number;
229161847f8eSopenharmony_ci
229261847f8eSopenharmony_ci    /**
229361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
229461847f8eSopenharmony_ci     *
229561847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
229661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
229761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
229861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
229961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
230061847f8eSopenharmony_ci     * 2.Incorrect parameter types; 3.Parameter verification failed.
230161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
230261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
230361847f8eSopenharmony_ci     * @since 9
230461847f8eSopenharmony_ci     */
230561847f8eSopenharmony_ci    /**
230661847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
230761847f8eSopenharmony_ci     *
230861847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
230961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
231061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
231161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
231261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
231361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
231461847f8eSopenharmony_ci     * 3.Parameter verification failed.
231561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
231661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
231761847f8eSopenharmony_ci     * @crossplatform
231861847f8eSopenharmony_ci     * @since 10
231961847f8eSopenharmony_ci     */
232061847f8eSopenharmony_ci    /**
232161847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
232261847f8eSopenharmony_ci     *
232361847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
232461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
232561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
232661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
232761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
232861847f8eSopenharmony_ci     * 2.Incorrect parameter types;
232961847f8eSopenharmony_ci     * 3.Parameter verification failed.
233061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
233161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
233261847f8eSopenharmony_ci     * @crossplatform
233361847f8eSopenharmony_ci     * @atomicservice
233461847f8eSopenharmony_ci     * @since 11
233561847f8eSopenharmony_ci     */
233661847f8eSopenharmony_ci    writeBigInt64BE(value: bigint, offset?: number): number;
233761847f8eSopenharmony_ci
233861847f8eSopenharmony_ci    /**
233961847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
234061847f8eSopenharmony_ci     *
234161847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
234261847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
234361847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
234461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
234561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
234661847f8eSopenharmony_ci     * 2.Incorrect parameter types;
234761847f8eSopenharmony_ci     * 3.Parameter verification failed.
234861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
234961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
235061847f8eSopenharmony_ci     * @since 9
235161847f8eSopenharmony_ci     */
235261847f8eSopenharmony_ci    /**
235361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
235461847f8eSopenharmony_ci     *
235561847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
235661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
235761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
235861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
235961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
236061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
236161847f8eSopenharmony_ci     * 3.Parameter verification failed.
236261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
236361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
236461847f8eSopenharmony_ci     * @crossplatform
236561847f8eSopenharmony_ci     * @since 10
236661847f8eSopenharmony_ci     */
236761847f8eSopenharmony_ci    /**
236861847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
236961847f8eSopenharmony_ci     *
237061847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
237161847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
237261847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
237361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
237461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
237561847f8eSopenharmony_ci     * 2.Incorrect parameter types;
237661847f8eSopenharmony_ci     * 3.Parameter verification failed.
237761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
237861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
237961847f8eSopenharmony_ci     * @crossplatform
238061847f8eSopenharmony_ci     * @atomicservice
238161847f8eSopenharmony_ci     * @since 11
238261847f8eSopenharmony_ci     */
238361847f8eSopenharmony_ci    writeBigInt64LE(value: bigint, offset?: number): number;
238461847f8eSopenharmony_ci
238561847f8eSopenharmony_ci    /**
238661847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
238761847f8eSopenharmony_ci     *
238861847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
238961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
239061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
239161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
239261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
239361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
239461847f8eSopenharmony_ci     * 3.Parameter verification failed.
239561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
239661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
239761847f8eSopenharmony_ci     * @since 9
239861847f8eSopenharmony_ci     */
239961847f8eSopenharmony_ci    /**
240061847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
240161847f8eSopenharmony_ci     *
240261847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
240361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
240461847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
240561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
240661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
240761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
240861847f8eSopenharmony_ci     * 3.Parameter verification failed.
240961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
241061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
241161847f8eSopenharmony_ci     * @crossplatform
241261847f8eSopenharmony_ci     * @since 10
241361847f8eSopenharmony_ci     */
241461847f8eSopenharmony_ci    /**
241561847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
241661847f8eSopenharmony_ci     *
241761847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
241861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
241961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
242061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
242161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
242261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
242361847f8eSopenharmony_ci     * 3.Parameter verification failed.
242461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
242561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
242661847f8eSopenharmony_ci     * @crossplatform
242761847f8eSopenharmony_ci     * @atomicservice
242861847f8eSopenharmony_ci     * @since 11
242961847f8eSopenharmony_ci     */
243061847f8eSopenharmony_ci    writeBigUInt64BE(value: bigint, offset?: number): number;
243161847f8eSopenharmony_ci
243261847f8eSopenharmony_ci    /**
243361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
243461847f8eSopenharmony_ci     *
243561847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
243661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
243761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
243861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
243961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
244061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
244161847f8eSopenharmony_ci     * 3.Parameter verification failed.
244261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
244361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
244461847f8eSopenharmony_ci     * @since 9
244561847f8eSopenharmony_ci     */
244661847f8eSopenharmony_ci    /**
244761847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
244861847f8eSopenharmony_ci     *
244961847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
245061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
245161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
245261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
245361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
245461847f8eSopenharmony_ci     * 2.Incorrect parameter types;
245561847f8eSopenharmony_ci     * 3.Parameter verification failed.
245661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
245761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
245861847f8eSopenharmony_ci     * @crossplatform
245961847f8eSopenharmony_ci     * @since 10
246061847f8eSopenharmony_ci     */
246161847f8eSopenharmony_ci    /**
246261847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
246361847f8eSopenharmony_ci     *
246461847f8eSopenharmony_ci     * @param { bigint } value - value value Number to be written to buf
246561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
246661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
246761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
246861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
246961847f8eSopenharmony_ci     * 2.Incorrect parameter types;
247061847f8eSopenharmony_ci     * 3.Parameter verification failed.
247161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
247261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
247361847f8eSopenharmony_ci     * @crossplatform
247461847f8eSopenharmony_ci     * @atomicservice
247561847f8eSopenharmony_ci     * @since 11
247661847f8eSopenharmony_ci     */
247761847f8eSopenharmony_ci    writeBigUInt64LE(value: bigint, offset?: number): number;
247861847f8eSopenharmony_ci
247961847f8eSopenharmony_ci    /**
248061847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
248161847f8eSopenharmony_ci     *
248261847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
248361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
248461847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
248561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
248661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
248761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
248861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
248961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
249061847f8eSopenharmony_ci     * @since 9
249161847f8eSopenharmony_ci     */
249261847f8eSopenharmony_ci    /**
249361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
249461847f8eSopenharmony_ci     *
249561847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
249661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
249761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
249861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
249961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
250061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
250161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
250261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
250361847f8eSopenharmony_ci     * @crossplatform
250461847f8eSopenharmony_ci     * @since 10
250561847f8eSopenharmony_ci     */
250661847f8eSopenharmony_ci    /**
250761847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
250861847f8eSopenharmony_ci     *
250961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
251061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
251161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
251261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
251361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
251461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
251561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
251661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
251761847f8eSopenharmony_ci     * @crossplatform
251861847f8eSopenharmony_ci     * @atomicservice
251961847f8eSopenharmony_ci     * @since 11
252061847f8eSopenharmony_ci     */
252161847f8eSopenharmony_ci    writeDoubleBE(value: number, offset?: number): number;
252261847f8eSopenharmony_ci
252361847f8eSopenharmony_ci    /**
252461847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
252561847f8eSopenharmony_ci     *
252661847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
252761847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
252861847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
252961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
253061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
253161847f8eSopenharmony_ci     * 2.Incorrect parameter types.
253261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
253361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
253461847f8eSopenharmony_ci     * @since 9
253561847f8eSopenharmony_ci     */
253661847f8eSopenharmony_ci    /**
253761847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
253861847f8eSopenharmony_ci     *
253961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
254061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
254161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
254261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
254361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
254461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
254561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
254661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
254761847f8eSopenharmony_ci     * @crossplatform
254861847f8eSopenharmony_ci     * @since 10
254961847f8eSopenharmony_ci     */
255061847f8eSopenharmony_ci    /**
255161847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
255261847f8eSopenharmony_ci     *
255361847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
255461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 8
255561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
255661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
255761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
255861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
255961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset]
256061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
256161847f8eSopenharmony_ci     * @crossplatform
256261847f8eSopenharmony_ci     * @atomicservice
256361847f8eSopenharmony_ci     * @since 11
256461847f8eSopenharmony_ci     */
256561847f8eSopenharmony_ci    writeDoubleLE(value: number, offset?: number): number;
256661847f8eSopenharmony_ci
256761847f8eSopenharmony_ci    /**
256861847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
256961847f8eSopenharmony_ci     *
257061847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
257161847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
257261847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
257361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
257461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
257561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
257661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
257761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
257861847f8eSopenharmony_ci     * @since 9
257961847f8eSopenharmony_ci     */
258061847f8eSopenharmony_ci    /**
258161847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
258261847f8eSopenharmony_ci     *
258361847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
258461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
258561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
258661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
258761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
258861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
258961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
259061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
259161847f8eSopenharmony_ci     * @crossplatform
259261847f8eSopenharmony_ci     * @since 10
259361847f8eSopenharmony_ci     */
259461847f8eSopenharmony_ci    /**
259561847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian.
259661847f8eSopenharmony_ci     *
259761847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
259861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
259961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
260061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
260161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
260261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
260361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
260461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
260561847f8eSopenharmony_ci     * @crossplatform
260661847f8eSopenharmony_ci     * @atomicservice
260761847f8eSopenharmony_ci     * @since 11
260861847f8eSopenharmony_ci     */
260961847f8eSopenharmony_ci    writeFloatBE(value: number, offset?: number): number;
261061847f8eSopenharmony_ci
261161847f8eSopenharmony_ci    /**
261261847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
261361847f8eSopenharmony_ci     *
261461847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
261561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
261661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
261761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
261861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
261961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
262061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
262161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
262261847f8eSopenharmony_ci     * @since 9
262361847f8eSopenharmony_ci     */
262461847f8eSopenharmony_ci    /**
262561847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
262661847f8eSopenharmony_ci     *
262761847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
262861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
262961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
263061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
263161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
263261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
263361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
263461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
263561847f8eSopenharmony_ci     * @crossplatform
263661847f8eSopenharmony_ci     * @since 10
263761847f8eSopenharmony_ci     */
263861847f8eSopenharmony_ci    /**
263961847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian.
264061847f8eSopenharmony_ci     *
264161847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
264261847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0]  Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
264361847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
264461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
264561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
264661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
264761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset]
264861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
264961847f8eSopenharmony_ci     * @crossplatform
265061847f8eSopenharmony_ci     * @atomicservice
265161847f8eSopenharmony_ci     * @since 11
265261847f8eSopenharmony_ci     */
265361847f8eSopenharmony_ci    writeFloatLE(value: number, offset?: number): number;
265461847f8eSopenharmony_ci
265561847f8eSopenharmony_ci    /**
265661847f8eSopenharmony_ci     * Writes value to buf at the specified offset. value must be a valid signed 8-bit integer.
265761847f8eSopenharmony_ci     *
265861847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
265961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 1
266061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
266161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
266261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
266361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
266461847f8eSopenharmony_ci     * 3.Parameter verification failed.
266561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
266661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
266761847f8eSopenharmony_ci     * @since 9
266861847f8eSopenharmony_ci     */
266961847f8eSopenharmony_ci    /**
267061847f8eSopenharmony_ci     * Writes value to buf at the specified offset. value must be a valid signed 8-bit integer.
267161847f8eSopenharmony_ci     *
267261847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
267361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 1
267461847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
267561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
267661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
267761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
267861847f8eSopenharmony_ci     * 3.Parameter verification failed.
267961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
268061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
268161847f8eSopenharmony_ci     * @crossplatform
268261847f8eSopenharmony_ci     * @since 10
268361847f8eSopenharmony_ci     */
268461847f8eSopenharmony_ci    /**
268561847f8eSopenharmony_ci     * Writes value to buf at the specified offset. value must be a valid signed 8-bit integer.
268661847f8eSopenharmony_ci     *
268761847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
268861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 1
268961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
269061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
269161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
269261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
269361847f8eSopenharmony_ci     * 3.Parameter verification failed.
269461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
269561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
269661847f8eSopenharmony_ci     * @crossplatform
269761847f8eSopenharmony_ci     * @atomicservice
269861847f8eSopenharmony_ci     * @since 11
269961847f8eSopenharmony_ci     */
270061847f8eSopenharmony_ci    writeInt8(value: number, offset?: number): number;
270161847f8eSopenharmony_ci
270261847f8eSopenharmony_ci    /**
270361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 16-bit integer
270461847f8eSopenharmony_ci     *
270561847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
270661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 2
270761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
270861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
270961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
271061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
271161847f8eSopenharmony_ci     * 3.Parameter verification failed.
271261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
271361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
271461847f8eSopenharmony_ci     * @since 9
271561847f8eSopenharmony_ci     */
271661847f8eSopenharmony_ci    /**
271761847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 16-bit integer
271861847f8eSopenharmony_ci     *
271961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
272061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 2
272161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
272261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
272361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
272461847f8eSopenharmony_ci     * 2.Incorrect parameter types;
272561847f8eSopenharmony_ci     * 3.Parameter verification failed.
272661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
272761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
272861847f8eSopenharmony_ci     * @crossplatform
272961847f8eSopenharmony_ci     * @since 10
273061847f8eSopenharmony_ci     */
273161847f8eSopenharmony_ci    /**
273261847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 16-bit integer
273361847f8eSopenharmony_ci     *
273461847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
273561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 2
273661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
273761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
273861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
273961847f8eSopenharmony_ci     * 2.Incorrect parameter types;
274061847f8eSopenharmony_ci     * 3.Parameter verification failed.
274161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
274261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
274361847f8eSopenharmony_ci     * @crossplatform
274461847f8eSopenharmony_ci     * @atomicservice
274561847f8eSopenharmony_ci     * @since 11
274661847f8eSopenharmony_ci     */
274761847f8eSopenharmony_ci    writeInt16BE(value: number, offset?: number): number;
274861847f8eSopenharmony_ci
274961847f8eSopenharmony_ci    /**
275061847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 16-bit integer
275161847f8eSopenharmony_ci     *
275261847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
275361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 2
275461847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
275561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
275661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
275761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
275861847f8eSopenharmony_ci     * 3.Parameter verification failed.
275961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
276061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
276161847f8eSopenharmony_ci     * @since 9
276261847f8eSopenharmony_ci     */
276361847f8eSopenharmony_ci    /**
276461847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 16-bit integer
276561847f8eSopenharmony_ci     *
276661847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
276761847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 2
276861847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
276961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
277061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
277161847f8eSopenharmony_ci     * 2.Incorrect parameter types;
277261847f8eSopenharmony_ci     * 3.Parameter verification failed.
277361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
277461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
277561847f8eSopenharmony_ci     * @crossplatform
277661847f8eSopenharmony_ci     * @since 10
277761847f8eSopenharmony_ci     */
277861847f8eSopenharmony_ci    /**
277961847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 16-bit integer
278061847f8eSopenharmony_ci     *
278161847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
278261847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 2
278361847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
278461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
278561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
278661847f8eSopenharmony_ci     * 2.Incorrect parameter types;
278761847f8eSopenharmony_ci     * 3.Parameter verification failed.
278861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
278961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
279061847f8eSopenharmony_ci     * @crossplatform
279161847f8eSopenharmony_ci     * @atomicservice
279261847f8eSopenharmony_ci     * @since 11
279361847f8eSopenharmony_ci     */
279461847f8eSopenharmony_ci    writeInt16LE(value: number, offset?: number): number;
279561847f8eSopenharmony_ci
279661847f8eSopenharmony_ci    /**
279761847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 32-bit integer.
279861847f8eSopenharmony_ci     *
279961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
280061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
280161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
280261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
280361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
280461847f8eSopenharmony_ci     * 2.Incorrect parameter types;
280561847f8eSopenharmony_ci     * 3.Parameter verification failed.
280661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
280761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
280861847f8eSopenharmony_ci     * @since 9
280961847f8eSopenharmony_ci     */
281061847f8eSopenharmony_ci    /**
281161847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 32-bit integer.
281261847f8eSopenharmony_ci     *
281361847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
281461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
281561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
281661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
281761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
281861847f8eSopenharmony_ci     * 2.Incorrect parameter types;
281961847f8eSopenharmony_ci     * 3.Parameter verification failed.
282061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
282161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
282261847f8eSopenharmony_ci     * @crossplatform
282361847f8eSopenharmony_ci     * @since 10
282461847f8eSopenharmony_ci     */
282561847f8eSopenharmony_ci    /**
282661847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 32-bit integer.
282761847f8eSopenharmony_ci     *
282861847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
282961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
283061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
283161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
283261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
283361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
283461847f8eSopenharmony_ci     * 3.Parameter verification failed.
283561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
283661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
283761847f8eSopenharmony_ci     * @crossplatform
283861847f8eSopenharmony_ci     * @atomicservice
283961847f8eSopenharmony_ci     * @since 11
284061847f8eSopenharmony_ci     */
284161847f8eSopenharmony_ci    writeInt32BE(value: number, offset?: number): number;
284261847f8eSopenharmony_ci
284361847f8eSopenharmony_ci    /**
284461847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 32-bit integer.
284561847f8eSopenharmony_ci     *
284661847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
284761847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
284861847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
284961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
285061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
285161847f8eSopenharmony_ci     * 2.Incorrect parameter types;
285261847f8eSopenharmony_ci     * 3.Parameter verification failed.
285361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
285461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
285561847f8eSopenharmony_ci     * @since 9
285661847f8eSopenharmony_ci     */
285761847f8eSopenharmony_ci    /**
285861847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 32-bit integer.
285961847f8eSopenharmony_ci     *
286061847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
286161847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
286261847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
286361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
286461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
286561847f8eSopenharmony_ci     * 2.Incorrect parameter types;
286661847f8eSopenharmony_ci     * 3.Parameter verification failed.
286761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
286861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
286961847f8eSopenharmony_ci     * @crossplatform
287061847f8eSopenharmony_ci     * @since 10
287161847f8eSopenharmony_ci     */
287261847f8eSopenharmony_ci    /**
287361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 32-bit integer.
287461847f8eSopenharmony_ci     *
287561847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
287661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy: 0 <= offset <= buf.length - 4
287761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
287861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
287961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
288061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
288161847f8eSopenharmony_ci     * 3.Parameter verification failed.
288261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
288361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
288461847f8eSopenharmony_ci     * @crossplatform
288561847f8eSopenharmony_ci     * @atomicservice
288661847f8eSopenharmony_ci     * @since 11
288761847f8eSopenharmony_ci     */
288861847f8eSopenharmony_ci    writeInt32LE(value: number, offset?: number): number;
288961847f8eSopenharmony_ci
289061847f8eSopenharmony_ci    /**
289161847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as big-endian
289261847f8eSopenharmony_ci     *
289361847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
289461847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
289561847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
289661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
289761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
289861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
289961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
290061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
290161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
290261847f8eSopenharmony_ci     * @since 9
290361847f8eSopenharmony_ci     */
290461847f8eSopenharmony_ci    /**
290561847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as big-endian
290661847f8eSopenharmony_ci     *
290761847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
290861847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
290961847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
291061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
291161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
291261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
291361847f8eSopenharmony_ci     * 2.Incorrect parameter types.
291461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
291561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
291661847f8eSopenharmony_ci     * @crossplatform
291761847f8eSopenharmony_ci     * @since 10
291861847f8eSopenharmony_ci     */
291961847f8eSopenharmony_ci    /**
292061847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as big-endian
292161847f8eSopenharmony_ci     *
292261847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
292361847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
292461847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
292561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
292661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
292761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
292861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
292961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
293061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
293161847f8eSopenharmony_ci     * @crossplatform
293261847f8eSopenharmony_ci     * @atomicservice
293361847f8eSopenharmony_ci     * @since 11
293461847f8eSopenharmony_ci     */
293561847f8eSopenharmony_ci    writeIntBE(value: number, offset: number, byteLength: number): number;
293661847f8eSopenharmony_ci
293761847f8eSopenharmony_ci    /**
293861847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as little-endian
293961847f8eSopenharmony_ci     *
294061847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
294161847f8eSopenharmony_ci     * @param { number } offset - offset offset  Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
294261847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
294361847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
294461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
294561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
294661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
294761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
294861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
294961847f8eSopenharmony_ci     * @since 9
295061847f8eSopenharmony_ci     */
295161847f8eSopenharmony_ci    /**
295261847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as little-endian
295361847f8eSopenharmony_ci     *
295461847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
295561847f8eSopenharmony_ci     * @param { number } offset - offset offset  Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
295661847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
295761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
295861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
295961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
296061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
296161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
296261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
296361847f8eSopenharmony_ci     * @crossplatform
296461847f8eSopenharmony_ci     * @since 10
296561847f8eSopenharmony_ci     */
296661847f8eSopenharmony_ci    /**
296761847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as little-endian
296861847f8eSopenharmony_ci     *
296961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
297061847f8eSopenharmony_ci     * @param { number } offset - offset offset  Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
297161847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
297261847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
297361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
297461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
297561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
297661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
297761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
297861847f8eSopenharmony_ci     * @crossplatform
297961847f8eSopenharmony_ci     * @atomicservice
298061847f8eSopenharmony_ci     * @since 11
298161847f8eSopenharmony_ci     */
298261847f8eSopenharmony_ci    writeIntLE(value: number, offset: number, byteLength: number): number;
298361847f8eSopenharmony_ci
298461847f8eSopenharmony_ci    /**
298561847f8eSopenharmony_ci     * Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer
298661847f8eSopenharmony_ci     *
298761847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
298861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 1
298961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
299061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
299161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
299261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
299361847f8eSopenharmony_ci     * 3.Parameter verification failed.
299461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
299561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
299661847f8eSopenharmony_ci     * @since 9
299761847f8eSopenharmony_ci     */
299861847f8eSopenharmony_ci    /**
299961847f8eSopenharmony_ci     * Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer
300061847f8eSopenharmony_ci     *
300161847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
300261847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 1
300361847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
300461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
300561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
300661847f8eSopenharmony_ci     * 2.Incorrect parameter types;
300761847f8eSopenharmony_ci     * 3.Parameter verification failed.
300861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
300961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
301061847f8eSopenharmony_ci     * @crossplatform
301161847f8eSopenharmony_ci     * @since 10
301261847f8eSopenharmony_ci     */
301361847f8eSopenharmony_ci    /**
301461847f8eSopenharmony_ci     * Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer
301561847f8eSopenharmony_ci     *
301661847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
301761847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 1
301861847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
301961847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
302061847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
302161847f8eSopenharmony_ci     * 2.Incorrect parameter types;
302261847f8eSopenharmony_ci     * 3.Parameter verification failed.
302361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
302461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
302561847f8eSopenharmony_ci     * @crossplatform
302661847f8eSopenharmony_ci     * @atomicservice
302761847f8eSopenharmony_ci     * @since 11
302861847f8eSopenharmony_ci     */
302961847f8eSopenharmony_ci    writeUInt8(value: number, offset?: number): number;
303061847f8eSopenharmony_ci
303161847f8eSopenharmony_ci    /**
303261847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 16-bit integer.
303361847f8eSopenharmony_ci     *
303461847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
303561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 2
303661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
303761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
303861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
303961847f8eSopenharmony_ci     * 2.Incorrect parameter types;
304061847f8eSopenharmony_ci     * 3.Parameter verification failed.
304161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
304261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
304361847f8eSopenharmony_ci     * @since 9
304461847f8eSopenharmony_ci     */
304561847f8eSopenharmony_ci    /**
304661847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 16-bit integer.
304761847f8eSopenharmony_ci     *
304861847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
304961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 2
305061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
305161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
305261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
305361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
305461847f8eSopenharmony_ci     * 3.Parameter verification failed.
305561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
305661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
305761847f8eSopenharmony_ci     * @crossplatform
305861847f8eSopenharmony_ci     * @since 10
305961847f8eSopenharmony_ci     */
306061847f8eSopenharmony_ci    /**
306161847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 16-bit integer.
306261847f8eSopenharmony_ci     *
306361847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
306461847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 2
306561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
306661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
306761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
306861847f8eSopenharmony_ci     * 2.Incorrect parameter types;
306961847f8eSopenharmony_ci     * 3.Parameter verification failed.
307061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
307161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
307261847f8eSopenharmony_ci     * @crossplatform
307361847f8eSopenharmony_ci     * @atomicservice
307461847f8eSopenharmony_ci     * @since 11
307561847f8eSopenharmony_ci     */
307661847f8eSopenharmony_ci    writeUInt16BE(value: number, offset?: number): number;
307761847f8eSopenharmony_ci
307861847f8eSopenharmony_ci    /**
307961847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 16-bit integer.
308061847f8eSopenharmony_ci     *
308161847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
308261847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 2
308361847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
308461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
308561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
308661847f8eSopenharmony_ci     * 2.Incorrect parameter types;
308761847f8eSopenharmony_ci     * 3.Parameter verification failed.
308861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
308961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
309061847f8eSopenharmony_ci     * @since 9
309161847f8eSopenharmony_ci     */
309261847f8eSopenharmony_ci    /**
309361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 16-bit integer.
309461847f8eSopenharmony_ci     *
309561847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
309661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 2
309761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
309861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
309961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
310061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
310161847f8eSopenharmony_ci     * 3.Parameter verification failed.
310261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
310361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
310461847f8eSopenharmony_ci     * @crossplatform
310561847f8eSopenharmony_ci     * @since 10
310661847f8eSopenharmony_ci     */
310761847f8eSopenharmony_ci    /**
310861847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 16-bit integer.
310961847f8eSopenharmony_ci     *
311061847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
311161847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 2
311261847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
311361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
311461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
311561847f8eSopenharmony_ci     * 2.Incorrect parameter types;
311661847f8eSopenharmony_ci     * 3.Parameter verification failed.
311761847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
311861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
311961847f8eSopenharmony_ci     * @crossplatform
312061847f8eSopenharmony_ci     * @atomicservice
312161847f8eSopenharmony_ci     * @since 11
312261847f8eSopenharmony_ci     */
312361847f8eSopenharmony_ci    writeUInt16LE(value: number, offset?: number): number;
312461847f8eSopenharmony_ci
312561847f8eSopenharmony_ci    /**
312661847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 32-bit integer.
312761847f8eSopenharmony_ci     *
312861847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
312961847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 4
313061847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
313161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
313261847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
313361847f8eSopenharmony_ci     * 2.Incorrect parameter types;
313461847f8eSopenharmony_ci     * 3.Parameter verification failed.
313561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
313661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
313761847f8eSopenharmony_ci     * @since 9
313861847f8eSopenharmony_ci     */
313961847f8eSopenharmony_ci    /**
314061847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 32-bit integer.
314161847f8eSopenharmony_ci     *
314261847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
314361847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 4
314461847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
314561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
314661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
314761847f8eSopenharmony_ci     * 2.Incorrect parameter types;
314861847f8eSopenharmony_ci     * 3.Parameter verification failed.
314961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
315061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
315161847f8eSopenharmony_ci     * @crossplatform
315261847f8eSopenharmony_ci     * @since 10
315361847f8eSopenharmony_ci     */
315461847f8eSopenharmony_ci    /**
315561847f8eSopenharmony_ci     * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 32-bit integer.
315661847f8eSopenharmony_ci     *
315761847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
315861847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 4
315961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
316061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
316161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
316261847f8eSopenharmony_ci     * 2.Incorrect parameter types;
316361847f8eSopenharmony_ci     * 3.Parameter verification failed.
316461847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
316561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
316661847f8eSopenharmony_ci     * @crossplatform
316761847f8eSopenharmony_ci     * @atomicservice
316861847f8eSopenharmony_ci     * @since 11
316961847f8eSopenharmony_ci     */
317061847f8eSopenharmony_ci    writeUInt32BE(value: number, offset?: number): number;
317161847f8eSopenharmony_ci
317261847f8eSopenharmony_ci    /**
317361847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 32-bit integer.
317461847f8eSopenharmony_ci     *
317561847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
317661847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 4
317761847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
317861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
317961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
318061847f8eSopenharmony_ci     * 2.Incorrect parameter types;
318161847f8eSopenharmony_ci     * 3.Parameter verification failed.
318261847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
318361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
318461847f8eSopenharmony_ci     * @since 9
318561847f8eSopenharmony_ci     */
318661847f8eSopenharmony_ci    /**
318761847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 32-bit integer.
318861847f8eSopenharmony_ci     *
318961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
319061847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 4
319161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
319261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
319361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
319461847f8eSopenharmony_ci     * 2.Incorrect parameter types;
319561847f8eSopenharmony_ci     * 3.Parameter verification failed.
319661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
319761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
319861847f8eSopenharmony_ci     * @crossplatform
319961847f8eSopenharmony_ci     * @since 10
320061847f8eSopenharmony_ci     */
320161847f8eSopenharmony_ci    /**
320261847f8eSopenharmony_ci     * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 32-bit integer.
320361847f8eSopenharmony_ci     *
320461847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
320561847f8eSopenharmony_ci     * @param { number } [offset] - offset [offset = 0] Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - 4
320661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
320761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
320861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
320961847f8eSopenharmony_ci     * 2.Incorrect parameter types;
321061847f8eSopenharmony_ci     * 3.Parameter verification failed.
321161847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
321261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
321361847f8eSopenharmony_ci     * @crossplatform
321461847f8eSopenharmony_ci     * @atomicservice
321561847f8eSopenharmony_ci     * @since 11
321661847f8eSopenharmony_ci     */
321761847f8eSopenharmony_ci    writeUInt32LE(value: number, offset?: number): number;
321861847f8eSopenharmony_ci
321961847f8eSopenharmony_ci    /**
322061847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as big-endian
322161847f8eSopenharmony_ci     *
322261847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
322361847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
322461847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
322561847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
322661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
322761847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
322861847f8eSopenharmony_ci     * 2.Incorrect parameter types.
322961847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
323061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
323161847f8eSopenharmony_ci     * @since 9
323261847f8eSopenharmony_ci     */
323361847f8eSopenharmony_ci    /**
323461847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as big-endian
323561847f8eSopenharmony_ci     *
323661847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
323761847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
323861847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
323961847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
324061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
324161847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
324261847f8eSopenharmony_ci     * 2.Incorrect parameter types.
324361847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
324461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
324561847f8eSopenharmony_ci     * @crossplatform
324661847f8eSopenharmony_ci     * @since 10
324761847f8eSopenharmony_ci     */
324861847f8eSopenharmony_ci    /**
324961847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as big-endian
325061847f8eSopenharmony_ci     *
325161847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
325261847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
325361847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
325461847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
325561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
325661847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
325761847f8eSopenharmony_ci     * 2.Incorrect parameter types.
325861847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
325961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
326061847f8eSopenharmony_ci     * @crossplatform
326161847f8eSopenharmony_ci     * @atomicservice
326261847f8eSopenharmony_ci     * @since 11
326361847f8eSopenharmony_ci     */
326461847f8eSopenharmony_ci    writeUIntBE(value: number, offset: number, byteLength: number): number;
326561847f8eSopenharmony_ci
326661847f8eSopenharmony_ci    /**
326761847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as little-endian
326861847f8eSopenharmony_ci     *
326961847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
327061847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
327161847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
327261847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
327361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
327461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
327561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
327661847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
327761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
327861847f8eSopenharmony_ci     * @since 9
327961847f8eSopenharmony_ci     */
328061847f8eSopenharmony_ci    /**
328161847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as little-endian
328261847f8eSopenharmony_ci     *
328361847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
328461847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
328561847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
328661847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
328761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
328861847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
328961847f8eSopenharmony_ci     * 2.Incorrect parameter types.
329061847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
329161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
329261847f8eSopenharmony_ci     * @crossplatform
329361847f8eSopenharmony_ci     * @since 10
329461847f8eSopenharmony_ci     */
329561847f8eSopenharmony_ci    /**
329661847f8eSopenharmony_ci     * Writes byteLength bytes of value to buf at the specified offset as little-endian
329761847f8eSopenharmony_ci     *
329861847f8eSopenharmony_ci     * @param { number } value - value value Number to be written to buf
329961847f8eSopenharmony_ci     * @param { number } offset - offset offset Number of bytes to skip before starting to write. Must satisfy 0 <= offset <= buf.length - byteLength
330061847f8eSopenharmony_ci     * @param { number } byteLength - byteLength byteLength Number of bytes to write. Must satisfy 0 < byteLength <= 6
330161847f8eSopenharmony_ci     * @returns { number } offset plus the number of bytes written
330261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
330361847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
330461847f8eSopenharmony_ci     * 2.Incorrect parameter types.
330561847f8eSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param]
330661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
330761847f8eSopenharmony_ci     * @crossplatform
330861847f8eSopenharmony_ci     * @atomicservice
330961847f8eSopenharmony_ci     * @since 11
331061847f8eSopenharmony_ci     */
331161847f8eSopenharmony_ci    writeUIntLE(value: number, offset: number, byteLength: number): number;
331261847f8eSopenharmony_ci  }
331361847f8eSopenharmony_ci
331461847f8eSopenharmony_ci  /**
331561847f8eSopenharmony_ci   * Process data as blob type
331661847f8eSopenharmony_ci   *
331761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
331861847f8eSopenharmony_ci   * @since 9
331961847f8eSopenharmony_ci   */
332061847f8eSopenharmony_ci  /**
332161847f8eSopenharmony_ci   * Process data as blob type
332261847f8eSopenharmony_ci   *
332361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
332461847f8eSopenharmony_ci   * @crossplatform
332561847f8eSopenharmony_ci   * @since 10
332661847f8eSopenharmony_ci   */
332761847f8eSopenharmony_ci  /**
332861847f8eSopenharmony_ci   * Process data as blob type
332961847f8eSopenharmony_ci   *
333061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
333161847f8eSopenharmony_ci   * @crossplatform
333261847f8eSopenharmony_ci   * @atomicservice
333361847f8eSopenharmony_ci   * @since 11
333461847f8eSopenharmony_ci   */
333561847f8eSopenharmony_ci  class Blob {
333661847f8eSopenharmony_ci    /**
333761847f8eSopenharmony_ci     * Creates a new Blob object containing a concatenation of the given sources.
333861847f8eSopenharmony_ci     *
333961847f8eSopenharmony_ci     * @param { string[] | ArrayBuffer[] | TypedArray[] | DataView[] | Blob[] } sources - sources sources An array of string, <ArrayBuffer>,
334061847f8eSopenharmony_ci     * <TypedArray>, <DataView>, or <Blob> objects, or any mix of such objects, that will be stored within the Blob
334161847f8eSopenharmony_ci     * @param { Object } [options] - options options {endings: string, type: string}
334261847f8eSopenharmony_ci     *                 endings:  One of either 'transparent' or 'native'.
334361847f8eSopenharmony_ci     *                 type: The Blob content-type
334461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
334561847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
334661847f8eSopenharmony_ci     * 2.Incorrect parameter types.
334761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
334861847f8eSopenharmony_ci     * @since 9
334961847f8eSopenharmony_ci     */
335061847f8eSopenharmony_ci    /**
335161847f8eSopenharmony_ci     * Creates a new Blob object containing a concatenation of the given sources.
335261847f8eSopenharmony_ci     *
335361847f8eSopenharmony_ci     * @param { string[] | ArrayBuffer[] | TypedArray[] | DataView[] | Blob[] } sources - sources sources An array of string, <ArrayBuffer>,
335461847f8eSopenharmony_ci     * <TypedArray>, <DataView>, or <Blob> objects, or any mix of such objects, that will be stored within the Blob
335561847f8eSopenharmony_ci     * @param { Object } [options] - options options {endings: string, type: string}
335661847f8eSopenharmony_ci     *                 endings:  One of either 'transparent' or 'native'.
335761847f8eSopenharmony_ci     *                 type: The Blob content-type
335861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
335961847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
336061847f8eSopenharmony_ci     * 2.Incorrect parameter types.
336161847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
336261847f8eSopenharmony_ci     * @crossplatform
336361847f8eSopenharmony_ci     * @since 10
336461847f8eSopenharmony_ci     */
336561847f8eSopenharmony_ci    /**
336661847f8eSopenharmony_ci     * Creates a new Blob object containing a concatenation of the given sources.
336761847f8eSopenharmony_ci     *
336861847f8eSopenharmony_ci     * @param { string[] | ArrayBuffer[] | TypedArray[] | DataView[] | Blob[] } sources - sources sources An array of string, <ArrayBuffer>,
336961847f8eSopenharmony_ci     * <TypedArray>, <DataView>, or <Blob> objects, or any mix of such objects, that will be stored within the Blob
337061847f8eSopenharmony_ci     * @param { Object } [options] - options options {endings: string, type: string}
337161847f8eSopenharmony_ci     *                 endings:  One of either 'transparent' or 'native'.
337261847f8eSopenharmony_ci     *                 type: The Blob content-type
337361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
337461847f8eSopenharmony_ci     * 1.Mandatory parameters are left unspecified;
337561847f8eSopenharmony_ci     * 2.Incorrect parameter types.
337661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
337761847f8eSopenharmony_ci     * @crossplatform
337861847f8eSopenharmony_ci     * @atomicservice
337961847f8eSopenharmony_ci     * @since 11
338061847f8eSopenharmony_ci     */
338161847f8eSopenharmony_ci    constructor(sources: string[] | ArrayBuffer[] | TypedArray[] | DataView[] | Blob[], options?: Object);
338261847f8eSopenharmony_ci
338361847f8eSopenharmony_ci    /**
338461847f8eSopenharmony_ci     * The total size of the Blob in bytes
338561847f8eSopenharmony_ci     *
338661847f8eSopenharmony_ci     * @type { number }
338761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
338861847f8eSopenharmony_ci     * @since 9
338961847f8eSopenharmony_ci     */
339061847f8eSopenharmony_ci    /**
339161847f8eSopenharmony_ci     * The total size of the Blob in bytes
339261847f8eSopenharmony_ci     *
339361847f8eSopenharmony_ci     * @type { number }
339461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
339561847f8eSopenharmony_ci     * @crossplatform
339661847f8eSopenharmony_ci     * @since 10
339761847f8eSopenharmony_ci     */
339861847f8eSopenharmony_ci    /**
339961847f8eSopenharmony_ci     * The total size of the Blob in bytes
340061847f8eSopenharmony_ci     *
340161847f8eSopenharmony_ci     * @type { number }
340261847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
340361847f8eSopenharmony_ci     * @crossplatform
340461847f8eSopenharmony_ci     * @atomicservice
340561847f8eSopenharmony_ci     * @since 11
340661847f8eSopenharmony_ci     */
340761847f8eSopenharmony_ci    size: number;
340861847f8eSopenharmony_ci
340961847f8eSopenharmony_ci    /**
341061847f8eSopenharmony_ci     * The content-type of the Blob
341161847f8eSopenharmony_ci     *
341261847f8eSopenharmony_ci     * @type { string }
341361847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
341461847f8eSopenharmony_ci     * @since 9
341561847f8eSopenharmony_ci     */
341661847f8eSopenharmony_ci    /**
341761847f8eSopenharmony_ci     * The content-type of the Blob
341861847f8eSopenharmony_ci     *
341961847f8eSopenharmony_ci     * @type { string }
342061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
342161847f8eSopenharmony_ci     * @crossplatform
342261847f8eSopenharmony_ci     * @since 10
342361847f8eSopenharmony_ci     */
342461847f8eSopenharmony_ci    /**
342561847f8eSopenharmony_ci     * The content-type of the Blob
342661847f8eSopenharmony_ci     *
342761847f8eSopenharmony_ci     * @type { string }
342861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
342961847f8eSopenharmony_ci     * @crossplatform
343061847f8eSopenharmony_ci     * @atomicservice
343161847f8eSopenharmony_ci     * @since 11
343261847f8eSopenharmony_ci     */
343361847f8eSopenharmony_ci    type: string;
343461847f8eSopenharmony_ci
343561847f8eSopenharmony_ci    /**
343661847f8eSopenharmony_ci     * Returns a promise that fulfills with an <ArrayBuffer> containing a copy of the Blob data.
343761847f8eSopenharmony_ci     *
343861847f8eSopenharmony_ci     * @returns { Promise<ArrayBuffer> }
343961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
344061847f8eSopenharmony_ci     * @since 9
344161847f8eSopenharmony_ci     */
344261847f8eSopenharmony_ci    /**
344361847f8eSopenharmony_ci     * Returns a promise that fulfills with an <ArrayBuffer> containing a copy of the Blob data.
344461847f8eSopenharmony_ci     *
344561847f8eSopenharmony_ci     * @returns { Promise<ArrayBuffer> }
344661847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
344761847f8eSopenharmony_ci     * @crossplatform
344861847f8eSopenharmony_ci     * @since 10
344961847f8eSopenharmony_ci     */
345061847f8eSopenharmony_ci    /**
345161847f8eSopenharmony_ci     * Returns a promise that fulfills with an <ArrayBuffer> containing a copy of the Blob data.
345261847f8eSopenharmony_ci     *
345361847f8eSopenharmony_ci     * @returns { Promise<ArrayBuffer> }
345461847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
345561847f8eSopenharmony_ci     * @crossplatform
345661847f8eSopenharmony_ci     * @atomicservice
345761847f8eSopenharmony_ci     * @since 11
345861847f8eSopenharmony_ci     */
345961847f8eSopenharmony_ci    arrayBuffer(): Promise<ArrayBuffer>;
346061847f8eSopenharmony_ci
346161847f8eSopenharmony_ci    /**
346261847f8eSopenharmony_ci     * Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered
346361847f8eSopenharmony_ci     *
346461847f8eSopenharmony_ci     * @param { number } [start] - start start The starting index
346561847f8eSopenharmony_ci     * @param { number } [end] - end end The ending index
346661847f8eSopenharmony_ci     * @param { string } [type] - type type The content-type for the new Blob
346761847f8eSopenharmony_ci     * @returns { Blob }
346861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
346961847f8eSopenharmony_ci     * @since 9
347061847f8eSopenharmony_ci     */
347161847f8eSopenharmony_ci    /**
347261847f8eSopenharmony_ci     * Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered
347361847f8eSopenharmony_ci     *
347461847f8eSopenharmony_ci     * @param { number } [start] - start start The starting index
347561847f8eSopenharmony_ci     * @param { number } [end] - end end The ending index
347661847f8eSopenharmony_ci     * @param { string } [type] - type type The content-type for the new Blob
347761847f8eSopenharmony_ci     * @returns { Blob }
347861847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
347961847f8eSopenharmony_ci     * @crossplatform
348061847f8eSopenharmony_ci     * @since 10
348161847f8eSopenharmony_ci     */
348261847f8eSopenharmony_ci    /**
348361847f8eSopenharmony_ci     * Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered
348461847f8eSopenharmony_ci     *
348561847f8eSopenharmony_ci     * @param { number } [start] - start start The starting index
348661847f8eSopenharmony_ci     * @param { number } [end] - end end The ending index
348761847f8eSopenharmony_ci     * @param { string } [type] - type type The content-type for the new Blob
348861847f8eSopenharmony_ci     * @returns { Blob }
348961847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
349061847f8eSopenharmony_ci     * @crossplatform
349161847f8eSopenharmony_ci     * @atomicservice
349261847f8eSopenharmony_ci     * @since 11
349361847f8eSopenharmony_ci     */
349461847f8eSopenharmony_ci    slice(start?: number, end?: number, type?: string): Blob;
349561847f8eSopenharmony_ci
349661847f8eSopenharmony_ci    /**
349761847f8eSopenharmony_ci     * Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string.
349861847f8eSopenharmony_ci     *
349961847f8eSopenharmony_ci     * @returns { Promise<string> }
350061847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
350161847f8eSopenharmony_ci     * @since 9
350261847f8eSopenharmony_ci     */
350361847f8eSopenharmony_ci    /**
350461847f8eSopenharmony_ci     * Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string.
350561847f8eSopenharmony_ci     *
350661847f8eSopenharmony_ci     * @returns { Promise<string> }
350761847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
350861847f8eSopenharmony_ci     * @crossplatform
350961847f8eSopenharmony_ci     * @since 10
351061847f8eSopenharmony_ci     */
351161847f8eSopenharmony_ci    /**
351261847f8eSopenharmony_ci     * Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string.
351361847f8eSopenharmony_ci     *
351461847f8eSopenharmony_ci     * @returns { Promise<string> }
351561847f8eSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
351661847f8eSopenharmony_ci     * @crossplatform
351761847f8eSopenharmony_ci     * @atomicservice
351861847f8eSopenharmony_ci     * @since 11
351961847f8eSopenharmony_ci     */
352061847f8eSopenharmony_ci    text(): Promise<string>;
352161847f8eSopenharmony_ci  }
352261847f8eSopenharmony_ci}
352361847f8eSopenharmony_ciexport default buffer;
3524