com.beanit.asn1bean.util

## Class HexString

- java.lang.Object
- - com.beanit.asn1bean.util.HexString

-     public class HexString
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `appendFromByte(byte b, java.lang.StringBuilder builder)`
    `static void` | `appendFromBytes(java.lang.StringBuilder builder, byte[] bytes, int offset, int length)`
    `static java.lang.String` | `fromByte(byte b)` Returns the byte as a hex string.
    `static java.lang.String` | `fromByte(int b)`
    `static java.lang.String` | `fromBytes(byte[] bytes)`
    `static java.lang.String` | `fromBytes(byte[] bytes, int offset, int length)`
    `static java.lang.String` | `fromBytes(java.nio.ByteBuffer buffer)`
    `static java.lang.String` | `fromBytesFormatted(byte[] bytes)`
    `static java.lang.String` | `fromBytesFormatted(byte[] bytes, int offset, int length)`
    `static java.lang.String` | `fromInt(int i)` Returns the integer value as hex string filled with leading zeros.
    `static java.lang.String` | `fromLong(long l)` Returns the long value as hex string filled with leading zeros.
    `static byte[]` | `toBytes(java.lang.String hexString)` Converts the given hex string to a byte array.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### fromByte

          public static java.lang.String fromByte(byte b)

      Returns the byte as a hex string. If b is less than 16 the hex string returned contains a leading zero.
      Parameters:
        `b` - the byte to be converted
      Returns:
        the hex string.

    - #### fromByte

          public static java.lang.String fromByte(int b)

    - #### fromInt

          public static java.lang.String fromInt(int i)

      Returns the integer value as hex string filled with leading zeros.
      Parameters:
        `i` - the integer value to be converted
      Returns:
        the hex string

    - #### fromLong

          public static java.lang.String fromLong(long l)

      Returns the long value as hex string filled with leading zeros.
      Parameters:
        `l` - the long value to be converted
      Returns:
        the hex string

    - #### fromBytes

          public static java.lang.String fromBytes(byte[] bytes)

    - #### fromBytesFormatted

          public static java.lang.String fromBytesFormatted(byte[] bytes)

    - #### fromBytes

          public static java.lang.String fromBytes(byte[] bytes,
                                                   int offset,
                                                   int length)

    - #### fromBytes

          public static java.lang.String fromBytes(java.nio.ByteBuffer buffer)

    - #### fromBytesFormatted

          public static java.lang.String fromBytesFormatted(byte[] bytes,
                                                            int offset,
                                                            int length)

    - #### toBytes

          public static byte[] toBytes(java.lang.String hexString)

      Converts the given hex string to a byte array.
      Parameters:
        `hexString` - the hex string
      Returns:
        the bytes
      Throws:
        `java.lang.NumberFormatException` - if the string is not a valid hex string

    - #### appendFromByte

          public static void appendFromByte(byte b,
                                            java.lang.StringBuilder builder)

    - #### appendFromBytes

          public static void appendFromBytes(java.lang.StringBuilder builder,
                                             byte[] bytes,
                                             int offset,
                                             int length)