UTF8 Class

Used to encode/decode UTF-8 data.


There are no constructors. You can call the methods directly.


decode( byte[] bytes ) returns String
Converts a byte array to a UTF-8 string.
decode( java.nio.ByteBuffer bytes ) returns String
Converts a ByteBuffer to a UTF-8 string.
encode( String s ) returns byte[]
Converts a UTF-8 string to a byte array.
isValid( java.nio.ByteBuffer data ) returns boolean
Returns true if the ByteBuffer contains a valid UTF-8 encoded string.