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

Jean-Noel Rouvignac
12.40.2014 dea70ae4fbbaf9f5343bdf5bce826c5712e748a3
opendj3-server-dev/src/server/org/opends/server/util/StaticUtils.java
@@ -773,7 +773,6 @@
    {
      return (char) b;
    }
    return ' ';
  }
@@ -813,7 +812,6 @@
   * array using hexadecimal characters and a 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.
   */
@@ -837,6 +835,34 @@
    return buffer.toString();
  }
  /**
   * Retrieves a string representation of the contents of the provided byte
   * sequence using hexadecimal characters and a space between each byte.
   *
   * @param b The byte sequence containing the data.
   * @return A string representation of the contents of the provided byte
   *         sequence using hexadecimal characters.
   */
  public static String bytesToHex(ByteSequence b)
  {
    if ((b == null) || (b.length() == 0))
    {
      return "";
    }
    int arrayLength = b.length();
    StringBuilder buffer = new StringBuilder((arrayLength - 1) * 3 + 2);
    buffer.append(byteToHex(b.byteAt(0)));
    for (int i=1; i < arrayLength; i++)
    {
      buffer.append(" ");
      buffer.append(byteToHex(b.byteAt(i)));
    }
    return buffer.toString();
  }
  /**
@@ -4199,6 +4225,7 @@
        }
        catch (NamingException ignored)
        {
          // ignore
        }
      }
    }
@@ -4219,6 +4246,7 @@
    }
    catch (InterruptedException wokenUp)
    {
      // ignore
    }
  }
@@ -4348,7 +4376,6 @@
  {
    return new Iterable<T>()
    {
      @Override
      public Iterator<T> iterator()
      {