bytes[] invalidUtf8 = {(byte)0xFF}; // 0xFF will never appear in valid UTF-8 ByteString b = ByteString.of(invalidUtf8); System.out.println(b.utf8()); // I was expecting an exception of some kind ...
Thanks for putting this nice library out! I found what I think is a defect: when I encode a message, it is always returned on full length of 8 bytes, even though a smaller length is correctly set in ...