}
public static void main(String[] args) {
CharsetDecoder dec = Charset.forName("UTF-8").newDecoder();
dec.onMalformedInput(CodingErrorAction.REPORT);
dec.onUnmappableCharacter(CodingErrorAction.REPORT);
byte[] bytes = { (byte) 0xF0, (byte) 0x9D, (byte) 0x80, (byte) 0x80 };
byte[] bytes2 = { (byte) 0xB8, (byte) 0x80, 0x63, 0x64, 0x65 };
ByteBuffer byteBuf = ByteBuffer.wrap(bytes);
ByteBuffer byteBuf2 = ByteBuffer.wrap(bytes2);
char[] chars = new char[1];