Data { public Data release() { synchronized (buffer.lockObject()) { released = true; buffer.release(); } return this; } Data(final DataBuffer buffer);  Data(final DataBuffer buffer, final int length);  Data(final int header, final int length);  Data(final Object object);  Data(final byte[] buffer);  Data();  Data(final byte[] buffer, final int offest, final int length); boolean isEmpty(); static Data decodeHeader(final ByteBuf buf, final SignatureFactory signatureFactory); boolean decodeBuffer(final ByteBuf buf); boolean decodeDone(final ByteBuf buf, SignatureFactory signatureFactory); boolean decodeDone(final ByteBuf buf, PublicKey publicKey, SignatureFactory signatureFactory); boolean verify(SignatureFactory signatureFactory); boolean verify(PublicKey publicKey, SignatureFactory signatureFactory); void encodeHeader(final ByteBuf buf, SignatureFactory signatureFactory); boolean encodeBuffer(final AlternativeCompositeByteBuf buf); void encodeDone(final ByteBuf buf, SignatureFactory signatureFactory); void encodeDone(final ByteBuf buf, SignatureFactory signatureFactory, PrivateKey messagePrivateKey); ByteBuf buffer(); Object object(); long validFromMillis(); Data validFromMillis(long validFromMillis); Data signNow(KeyPair keyPair, SignatureFactory signatureFactory); Data protectEntryNow(KeyPair keyPair, SignatureFactory signatureFactory); Data signNow(PrivateKey privateKey, SignatureFactory signatureFactory); Data protectEntryNow(PrivateKey privateKey, SignatureFactory signatureFactory); Data protectEntry(); Data protectEntry(PrivateKey privateKey); Data protectEntry(KeyPair keyPair); Data sign(); Data sign(PrivateKey privateKey); Data sign(KeyPair keyPair); int length(); long expirationMillis(); int ttlSeconds(); Data ttlSeconds(int ttlSeconds); Data addBasedOn(Number160 basedOn); Set<Number160> basedOnSet(); SignatureFactory signatureFactory(); Data signatureFactory(SignatureFactory signatureFactory); boolean isProtectedEntry(); boolean isSigned(); Data signed(boolean signed); Data signed(); boolean isFlag1(); Data flag1(boolean flag1); Data flag1(); boolean isFlag2(); Data flag2(boolean flag2); Data flag2(); boolean hasPrepareFlag(); Data prepareFlag(boolean prepareFlag); Data prepareFlag(); Data deleted(); Data deleted(boolean deleted); boolean isDeleted(); boolean hasPublicKey(); Data publicKeyFlag(boolean publicKeyFlag); Data publicKeyFlag(); boolean isMeta(); Data meta(boolean meta); Data meta(); boolean isReleaseAfterSend(); Data releaseAfterSend(boolean releaseAfterSend); Data releaseAfterSend(); @Override String toString(); Data duplicate(); Data duplicateMeta(); static Type type(final int header); byte[] toBytes(); ByteBuffer[] toByteBuffers(); PublicKey publicKey(); PrivateKey privateKey(); Data publicKey(PublicKey publicKey); SignatureCodec signature(); Data signature(SignatureCodec signature); @Override int hashCode(); @Override boolean equals(final Object obj); Number160 hash(); Data release(); Object lockObject(); boolean isReleased();  }
@Test public void clearTest() { ByteBuf acbb = AlternativeCompositeByteBuf.compBuffer(AlternativeCompositeByteBuf.UNPOOLED_HEAP); acbb.clear(); Assert.assertEquals(0, acbb.readerIndex()); Assert.assertEquals(0, acbb.writerIndex()); acbb.release(); }