@Test public void newInstance () { val value = new byte[] { 1, 2, 3 }; val pad = 3; val bytes = Bytes.resizableArray() .write1B(BIT_BINNARY.getCode()) .write4B(value.length) .write1B(8 - pad) .writeNB(value) .arrayCopy(); ErlangBitString bitString = ErlangTerm.newInstance(wrappedBuffer(bytes)); assertThat(bitString).isNotNull(); SoftAssertions.assertSoftly(softly -> { softly.assertThat(bitString.getBits()) .isEqualTo(new byte[] { 1, 2, 0 }); softly.assertThat(bitString.getPad()) .isEqualTo(3); }); }
public byte[] getBits () { return bits.clone(); }
ErlangBitString extends ErlangTerm { public byte[] getBits () { return bits.clone(); } }
ErlangBitString extends ErlangTerm { public byte[] getBits () { return bits.clone(); } ErlangBitString(TermType type, @NonNull ByteBuf buffer); @Builder  ErlangBitString(@NonNull byte[] bits, int pad); }
ErlangBitString extends ErlangTerm { public byte[] getBits () { return bits.clone(); } ErlangBitString(TermType type, @NonNull ByteBuf buffer); @Builder  ErlangBitString(@NonNull byte[] bits, int pad); byte[] getBits(); }
ErlangBitString extends ErlangTerm { public byte[] getBits () { return bits.clone(); } ErlangBitString(TermType type, @NonNull ByteBuf buffer); @Builder  ErlangBitString(@NonNull byte[] bits, int pad); byte[] getBits();  }