charset.bytes documentation
Functions used to get the bytes of a value in a particular charset
ascii-bytes
(ascii-bytes value)
Returns value encoded as an ascii byte[]
value - the value to get the bytes of
get-bytes
(get-bytes value)
(get-bytes value charset)
Calls .getBytes() on value. If no charset is specified the default charset
is used. Returns byte[]
value - (String) the value to get he bytes of
charset - (String/Charset) either the name of a Charset or an instance
of the Charset class. Throws an IllegalArgumentException if charset
is neither.
utf16-bytes
(utf16-bytes value)
Returns value encoded as a utf-16 byte[]
value - the value to get the bytes of
utf8-bytes
(utf8-bytes value)
Returns value encoded as a utf-8 byte[]
value - the value to get the bytes of