@Override
    public void writeInt(final int v) throws IOException {
        ensureAvailable(INT_SIZE_IN_BYTES);
        MEM.putInt(buffer, ARRAY_BYTE_BASE_OFFSET + pos, v);
        pos += INT_SIZE_IN_BYTES;
    }
@Test
    public void testWriteIntV() throws Exception {
        int expected = 100;
        out.writeInt(expected);
        int actual = Bits.readInt(out.buffer, 0, ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN);

        assertEquals(expected, actual);
    }