ByteBuffer extends AbstractBuffer { @Override public String toString() { return new String(getArray(), StandardCharsets.UTF_8); } protected  ByteBuffer(final byte[] buffer); protected  ByteBuffer(final int readerIndex, final int lowerBoundary, final int upperBoundary, final byte[] buffer); protected  ByteBuffer(final int readerIndex, final int lowerBoundary, final int upperBoundary,
            final int writerIndex, final byte[] buffer); @Override Buffer slice(final int start, final int stop); @Override Buffer readBytes(final int length); @Override boolean hasReadableBytes(); @Override boolean isEmpty(); @Override byte getByte(final int index); @Override void write(final byte b); @Override void write(final byte[] bytes); @Override byte[] getArray(); @Override byte[] getRawArray(); @Override byte readByte(); @Override byte peekByte(); long unsignedInt(final byte a, final byte b, final byte c, final byte d); @Override long readUnsignedInt(); @Override int readInt(); @Override short readShort(); @Override int readUnsignedShort(); @Override int getInt(final int index); @Override short getShort(final int index); @Override void setUnsignedShort(final int index, final int value); @Override int getUnsignedShort(final int index); @Override short getUnsignedByte(final int index); @Override String dumpAsHex(); @Override Buffer clone(); @Override int hashCode(); @Override boolean equals(final Object other); @Override boolean equalsIgnoreCase(final Object other); @Override void setByte(final int index, final byte value); @Override void setUnsignedByte(final int index, final short value); @Override String toString(); @Override void getBytes(final Buffer dst); @Override void getBytes(final int index, final Buffer dst); @Override void getBytes(final byte[] dst); void getBytes(final int index, final java.nio.ByteBuffer dst); void writeExternal(final ObjectOutput out); void readExternal(final ObjectInput in); @Override boolean hasWriteSupport(); @Override void write(final String s); @Override void write(final String s, final String charset); @Override void setInt(final int index, final int value); @Override void setUnsignedInt(final int index, final long value); @Override void write(final int value); @Override void write(final long value); @Override void writeAsString(final int value); @Override void writeAsString(final long value);  }
@Test public void testWrapLong() throws Exception { assertThat(Buffers.wrap(123L).toString(), is("123")); assertThat(Buffers.wrap(-123L).toString(), is("-123")); }
@Test public void testWrapInt() throws Exception { assertThat(Buffers.wrap(123).toString(), is("123")); assertThat(Buffers.wrap(-123).toString(), is("-123")); }