public static int putAsShort(ByteBuffer buf, int index, int val) {
        buf.put(index + 1, (byte) val);
        val >>= 8;
        buf.put(index, (byte) val);
        return index + Bytes.SIZEOF_SHORT;
    }
Put a short value out to the given ByteBuffer's current position in big-endian format. This
also advances the position in buffer by short size.

@param buffer the ByteBuffer to write to
@param val    short to write out
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/ByteBufferUtils.java