@Test public void testParseUTF_SB1() throws Exception { VanillaBytes bytes = Bytes.allocateElasticDirect(); byte[] bytes2 = new byte[128]; Arrays.fill(bytes2, (byte) '?'); bytes.write(bytes2); StringBuilder sb = new StringBuilder(); BytesInternal.parseUtf8(bytes, sb, 128); assertEquals(128, sb.length()); assertEquals(new String(bytes2, 0), sb.toString()); }
@NotNull private Wire wireFactory() { final Bytes bytes = Bytes.allocateElasticDirect(); return (isTextWire) ? new TextWire(bytes) : new BinaryWire(bytes); }