Class StringUtils

java.lang.Object
com.ning.http.util.StringUtils

public final class StringUtils extends Object
  • Method Details

    • stringBuilder

      public static StringBuilder stringBuilder()
      BEWARE: MUSN'T APPEND TO ITSELF!
      Returns:
      a pooled StringBuilder
    • charSequence2ByteBuffer

      public static ByteBuffer charSequence2ByteBuffer(CharSequence cs, Charset charset)
    • byteBuffer2ByteArray

      public static byte[] byteBuffer2ByteArray(ByteBuffer bb)
    • charSequence2Bytes

      public static byte[] charSequence2Bytes(CharSequence sb, Charset charset)
    • toHexString

      public static String toHexString(byte[] bytes)
      See Also:
    • toHexString

      public static String toHexString(byte[] bytes, boolean uppercase)
      Convert a byte array to a hexadecimal string.
      Parameters:
      bytes - The bytes to format.
      uppercase - When true creates uppercase hex characters instead of lowercase (the default).
      Returns:
      A hexadecimal representation of the specified bytes.