Converts an array byte to string.
1 byte.toString
<byte.toString encoding='encoding'>
<data /> !
</byte.toString>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aencoding | string | Type of codification of the argument. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Edata | String | Array byte |
Returns | |
---|---|
Type | Description |
String | Returns the number of bytes.If the received value is null, immediately it will return null as result. |
Exceptions
requires 1 values, received [...]
It has been specified an incorrect number of values.
unsupportedEncodingException
Encode not supported.
Remarks
Allow any type of data convertible to byte array as a value: a string, an array of bytes, a node (of a XML or HTML file), a BLOB (Binary Large OBject), or a file.
Example
Converter the content of a file to a string.
Copy
<xsql-script name='byte_toString_sample1'> <body> <set name='content'> <byte.toString> <file name='z:\test.xml' type='absolute' /> </byte.toString> </set> <println> variable of type <variable.typeof><content /></variable.typeof> </println> </body> </xsql-script>
The showed result will be:
Copy
variable of type java.lang.String