static Comparer getBestComparer() {
      try {
        Class<? extends Comparer> theClass =
          Class.forName(UNSAFE_COMPARER_NAME).asSubclass(Comparer.class);

        return theClass.getConstructor().newInstance();
      } catch (Throwable t) { // ensure we really catch *everything*
        return PureJavaComparer.INSTANCE;
      }
    }
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