@Override
      void putShort(ByteBuffer buffer, short val) {
        int newPos = UnsafeAccess.putShort(buffer, buffer.position(), val);
        buffer.position(newPos);
      }
Utility functions for working with byte buffers, such as reading/writing variable-length long
numbers.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java