未验证 提交 ff1f31f0 编写于 作者: O openharmony_ci 提交者: Gitee

!21209 翻译完成:20433 修改buffer、url模块md文档与d.ts部分接口错误码描述不相符问题

Merge pull request !21209 from wusongqing/TR20433
...@@ -218,7 +218,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -218,7 +218,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "totalLength" is out of range. | | 10200001 | The value of "length" is out of range. It must be >= 0 and <= uint32 max. Received value is: [length] |
**Example** **Example**
...@@ -1162,7 +1162,7 @@ let result = buf1.writeFloatLE(0xcabcbcbc, 0); ...@@ -1162,7 +1162,7 @@ let result = buf1.writeFloatLE(0xcabcbcbc, 0);
readInt8(offset?: number): number readInt8(offset?: number): number
Reads a 8-bit signed integer from this **Buffer** instance at the specified offset. Reads an 8-bit signed integer from this **Buffer** instance at the specified offset.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
...@@ -1387,7 +1387,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -1387,7 +1387,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -1431,7 +1431,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -1431,7 +1431,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -1449,7 +1449,7 @@ let result = buf1.writeIntLE(0x123456789011, 0, 6); ...@@ -1449,7 +1449,7 @@ let result = buf1.writeIntLE(0x123456789011, 0, 6);
readUInt8(offset?: number): number readUInt8(offset?: number): number
Reads a 8-bit unsigned integer from this **Buffer** instance at the specified offset. Reads an 8-bit unsigned integer from this **Buffer** instance at the specified offset.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
...@@ -1681,7 +1681,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -1681,7 +1681,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -1723,7 +1723,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -1723,7 +1723,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -1915,7 +1915,7 @@ Converts the data at the specified position in this **Buffer** instance into a s ...@@ -1915,7 +1915,7 @@ Converts the data at the specified position in this **Buffer** instance into a s
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| encoding | string | No| Encoding format of the string. The default value is **utf-8**.| | encoding | string | No| Encoding format (valid only when **value** is a string). The default value is **utf-8**.|
| start | number | No| Offset to the start position of the data to convert. The default value is **0**.| | start | number | No| Offset to the start position of the data to convert. The default value is **0**.|
| end | number | No| Offset to the end position of the data to convert. The default value is the length of this **Buffer** instance.| | end | number | No| Offset to the end position of the data to convert. The default value is the length of this **Buffer** instance.|
...@@ -2037,7 +2037,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2037,7 +2037,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2076,7 +2076,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2076,7 +2076,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2115,7 +2115,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2115,7 +2115,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2154,7 +2154,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2154,7 +2154,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2193,7 +2193,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2193,7 +2193,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] |
**Example** **Example**
...@@ -2232,7 +2232,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2232,7 +2232,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] |
**Example** **Example**
...@@ -2271,7 +2271,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2271,7 +2271,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] |
**Example** **Example**
...@@ -2311,7 +2311,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2311,7 +2311,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] |
**Example** **Example**
...@@ -2326,7 +2326,7 @@ let result = buf.writeFloatLE(0xcafebabe, 0); ...@@ -2326,7 +2326,7 @@ let result = buf.writeFloatLE(0xcafebabe, 0);
writeInt8(value: number, offset?: number): number writeInt8(value: number, offset?: number): number
Writes a 8-bit signed integer to this **Buffer** instance at the specified offset. Writes an 8-bit signed integer to this **Buffer** instance at the specified offset.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
...@@ -2350,7 +2350,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2350,7 +2350,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2391,7 +2391,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2391,7 +2391,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2431,7 +2431,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2431,7 +2431,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2470,7 +2470,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2470,7 +2470,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2510,7 +2510,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2510,7 +2510,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2550,7 +2550,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2550,7 +2550,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2591,7 +2591,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2591,7 +2591,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2606,7 +2606,7 @@ let result = buf.writeIntLE(0x1234567890ab, 0, 6); ...@@ -2606,7 +2606,7 @@ let result = buf.writeIntLE(0x1234567890ab, 0, 6);
writeUInt8(value: number, offset?: number): number writeUInt8(value: number, offset?: number): number
Writes a 8-bit unsigned integer to this **Buffer** instance at the specified offset. Writes an 8-bit unsigned integer to this **Buffer** instance at the specified offset.
**System capability**: SystemCapability.Utils.Lang **System capability**: SystemCapability.Utils.Lang
...@@ -2630,7 +2630,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2630,7 +2630,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2672,7 +2672,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2672,7 +2672,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2712,7 +2712,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2712,7 +2712,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2752,7 +2752,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2752,7 +2752,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2791,7 +2791,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2791,7 +2791,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2831,7 +2831,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2831,7 +2831,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
...@@ -2871,7 +2871,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco ...@@ -2871,7 +2871,7 @@ For details about the error codes, see [Utils Error Codes](../errorcodes/errorco
| ID| Error Message| | ID| Error Message|
| -------- | -------- | | -------- | -------- |
| 10200001 | The value of "[value/offset/byteLength]" is out of range. | | 10200001 | The value of "[param]" is out of range. It must be >= [left range] and <= [right range]. Received value is: [param] |
**Example** **Example**
......
...@@ -13,7 +13,7 @@ import Url from '@ohos.url' ...@@ -13,7 +13,7 @@ import Url from '@ohos.url'
### constructor<sup>9+</sup> ### constructor<sup>9+</sup>
constructor(init?: string[][] | Record&lt;string, string&gt; | string | URLSearchParams) constructor(init?: string[][] | Record&lt;string, string&gt; | string | URLParams)
A constructor used to create a **URLParams** instance. A constructor used to create a **URLParams** instance.
...@@ -23,7 +23,7 @@ A constructor used to create a **URLParams** instance. ...@@ -23,7 +23,7 @@ A constructor used to create a **URLParams** instance.
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| init | string[][] \| Record&lt;string, string&gt; \| string \| URLSearchParams | No| Input parameter objects, which include the following:<br>- **string[][]**: two-dimensional string array<br>- **Record&lt;string, string&gt;**: list of objects<br>- **string**: string<br>- **URLSearchParams**: object<br>The default value is **null**.| | init | string[][] \| Record&lt;string, string&gt; \| string \| URLParams | No| Input parameter objects, which include the following:<br>- **string[][]**: two-dimensional string array<br>- **Record&lt;string, string&gt;**: list of objects<br>- **string**: string<br>- **URLParams**: object<br>The default value is **null**.|
**Example** **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册