private static String nextBytesToStr(ByteBuff buf, int pos) {
    int maxBytes = buf.limit() - pos;
    int numBytes = Math.min(16, maxBytes);
    return Bytes.toStringBinary(buf.array(), buf.arrayOffset() + pos, numBytes)
      + (numBytes < maxBytes ? "..." : "");
  }
Convert a few next bytes in the given buffer at the given position to string. Used for error
messages.
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java