public static String toUTF ( byte [ ] bytes ) { int codePoint = ByteBuffer . wrap ( bytes ) . getInt ( ) ; if ( codePoint < 0 || codePoint > 0X10FFFF ) throw new IllegalArgumentException ( "RangeError: pack(U): value out of range" ) ; return String . valueOf ( ( char ) codePoint ) ; }
Converts a byte array into an UTF String .