@Override
      short toShort(ByteBuffer buffer, int offset) {
        return UnsafeAccess.toShort(buffer, offset);
      }
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