@Test public void testUtf8String() { Utf8String string = new Utf8String("Hello, world!"); assertThat(TypeEncoder.encodeString(string), is("000000000000000000000000000000000000000000000000000000000000000d" + "48656c6c6f2c20776f726c642100000000000000000000000000000000000000")); }
static String encodeString(Utf8String string) { byte[] utfEncoded = string.getValue().getBytes(StandardCharsets.UTF_8); return encodeDynamicBytes(new DynamicBytes(utfEncoded)); }
TypeEncoder { static String encodeString(Utf8String string) { byte[] utfEncoded = string.getValue().getBytes(StandardCharsets.UTF_8); return encodeDynamicBytes(new DynamicBytes(utfEncoded)); } }
TypeEncoder { static String encodeString(Utf8String string) { byte[] utfEncoded = string.getValue().getBytes(StandardCharsets.UTF_8); return encodeDynamicBytes(new DynamicBytes(utfEncoded)); } private  TypeEncoder(); }
TypeEncoder { static String encodeString(Utf8String string) { byte[] utfEncoded = string.getValue().getBytes(StandardCharsets.UTF_8); return encodeDynamicBytes(new DynamicBytes(utfEncoded)); } private  TypeEncoder(); @SuppressWarnings("unchecked") static String encode(Type parameter); }
TypeEncoder { static String encodeString(Utf8String string) { byte[] utfEncoded = string.getValue().getBytes(StandardCharsets.UTF_8); return encodeDynamicBytes(new DynamicBytes(utfEncoded)); } private  TypeEncoder(); @SuppressWarnings("unchecked") static String encode(Type parameter);  }