@Override
    public void writeShort(final int v) throws IOException {
        ensureAvailable(SHORT_SIZE_IN_BYTES);
        Bits.writeShort(buffer, pos, (short) v, isBigEndian);
        pos += SHORT_SIZE_IN_BYTES;
    }
@Test
    public void testWriteShortForPositionVAndByteOrder() throws IOException {
        short expected = 42;
        out.pos = 2;
        out.writeShort(42, LITTLE_ENDIAN);
        short actual = Bits.readShortL(out.buffer, 2);
        assertEquals(expected, actual);
    }