}
private String utf8Decode(byte[] data) {
String reason;
final ByteBuffer b = ByteBuffer.wrap(data, 2, data.length - 2);
Charset charset = new StrictUtf8();
final CharsetDecoder decoder = charset.newDecoder();
int n = (int) (b.remaining() * decoder.averageCharsPerByte());
CharBuffer cb = CharBuffer.allocate(n);
while (true) {
CoderResult result = decoder.decode(b, cb, true);
if (result.isUnderflow()) {