@Test public void decode () throws Exception { val bytes = Bytes.resizableArray() .write1B(STRING.getCode()) .write2B("popa".length()) .writeNB("popa", ISO_8859_1) .arrayCopy(); try (val input = new OtpInputStream(bytes)) { ErlangString string = ErlangTerm.newInstance(wrappedBuffer(bytes)); assertThat(string.asText()) .isEqualTo(input.read_string()); } }
@Override public String asText () { return value; }
ErlangString extends ErlangTerm { @Override public String asText () { return value; } }
ErlangString extends ErlangTerm { @Override public String asText () { return value; } ErlangString(TermType type, @NonNull ByteBuf buffer);  ErlangString(String value); }
ErlangString extends ErlangTerm { @Override public String asText () { return value; } ErlangString(TermType type, @NonNull ByteBuf buffer);  ErlangString(String value); @Override String asText(); }
ErlangString extends ErlangTerm { @Override public String asText () { return value; } ErlangString(TermType type, @NonNull ByteBuf buffer);  ErlangString(String value); @Override String asText();  }