com.thinkaurelius.titan.diskstorage.util

## Class Hex

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.util.Hex

-     public class Hex
      extends Object

  Utility methods for hexadecimal representation of bytes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Hex()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `bytesToHex(byte... bytes)`
    `static Constructor` | `getProtectedConstructor(Class klass, Class... paramTypes)` Used to get access to protected/private constructor of the specified class
    `static byte[]` | `hexToBytes(String str)`
    `static String` | `wrapCharArray(char[] c)` Create a String from a char array with zero-copy (if available), using reflection to access a package-protected constructor of String.

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

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

- - ### Constructor Detail

    - #### Hex

          public Hex()

  - ### Method Detail

    - #### hexToBytes

          public static byte[] hexToBytes(String str)

    - #### bytesToHex

          public static String bytesToHex(byte... bytes)

    - #### wrapCharArray

          public static String wrapCharArray(char[] c)

      Create a String from a char array with zero-copy (if available), using reflection to access a package-protected constructor of String.

    - #### getProtectedConstructor

          public static Constructor getProtectedConstructor(Class klass,
                                            Class... paramTypes)

      Used to get access to protected/private constructor of the specified class
      Parameters:
        `klass` - - name of the class
        `paramTypes` - - types of the constructor parameters
      Returns:
        Constructor if successful, null if the constructor cannot be accessed

Copyright © 2012–2014. All rights reserved.