Converts an array byte to string.

1 byte.toString

<byte.toString encoding='encoding'>
    <data /> !
</byte.toString>

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