code: public static String toHexString(ByteBuffer buffer) {
          if (buffer == null)
              return "null";
          return TypeUtils.toHexString(toArray(buffer));
      }
docs: Convert buffer to a Hex String.
  
  @param buffer the buffer to generate a hex byte summary from
  @return A hex string