@Override
    public void writeShort(final int v) throws IOException {
        ensureAvailable(SHORT_SIZE_IN_BYTES);
        MEM.putShort(buffer, ARRAY_BYTE_BASE_OFFSET + pos, (short) v);
        pos += SHORT_SIZE_IN_BYTES;
    }
@Test
    public void testWriteShortV() throws Exception {
        short expected = 100;
        out.writeShort(expected);
        short actual = Bits.readShort(out.buffer, 0, ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN);

        assertEquals(expected, actual);
    }