mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

david_page
28.44.2007 d157162bc758d519d2361518736fe481975e8c46
opends/src/server/org/opends/server/util/StaticUtils.java
@@ -747,6 +747,35 @@
  /**
   * Retrieves a string representation of the contents of the provided byte
   * array using hexadecimal characters with no space between each byte.
   *
   * @param  b  The byte array containing the data.
   *
   * @return  A string representation of the contents of the provided byte
   *          array using hexadecimal characters.
   */
  public static String bytesToHexNoSpace(byte[] b)
  {
    if ((b == null) || (b.length == 0))
    {
      return "";
    }
    int arrayLength = b.length;
    StringBuilder buffer = new StringBuilder(arrayLength * 2);
    for (int i=0; i < arrayLength; i++)
    {
      buffer.append(byteToHex(b[i]));
    }
    return buffer.toString();
  }
  /**
   * Retrieves a string representation of the contents of the provided byte
   * array using hexadecimal characters and a space between each byte.
   *
   * @param  b  The byte array containing the data.