ByteBufferWrapper extends Buffer { @Override public short getShort() { return delegate.getShort(); } ByteBufferWrapper(
            @NotNull
            final ByteBuffer delegate); @Override long position(); @Override Buffer position(final long position); @Override Buffer advance(final long bytes); @Override long limit(); @Override boolean hasRemaining(); @Override long remaining(); @Override Buffer get(byte[] dst, int offset, int length); @Override Buffer get(final byte[] dst); @Override byte get(); @Override byte get(final long index); @Override int getInt(); @Override int getInt(final long index); @Override long getLong(); @Override long getLong(final long index); @Override char getChar(); @Override char getChar(long index); @Override short getShort(); @Override short getShort(final long index); @Override Buffer slice(); @Override Buffer slice(final long length); @Override Buffer slice(final long from, final long size);  }
@Test public void testGetShort() { short data = 32765; byte[] bytes = new byte[]{ (byte) ((data >> 8) & 0xff), (byte) ((data) & 0xff) }; final Buffer buf = Buffer.from(bytes); short result = buf.getShort(); assertEquals(data, result); }
@Test public void testGetShortWithIndex() { short data = 32765; byte[] bytes = new byte[]{ (byte) ((data >> 8) & 0xff), (byte) ((data) & 0xff) }; final Buffer buf = Buffer.from(bytes); short result = buf.getShort(0); assertEquals(data, result); }