Class Hex

java.lang.Object
org.apache.cassandra.utils.Hex

public class Hex extends Object
  • Constructor Details

    • Hex

      public Hex()
  • Method Details

    • hexToBytes

      public static byte[] hexToBytes(String str)
    • bytesToHex

      public static String bytesToHex(byte... bytes)
    • bytesToHex

      public static String bytesToHex(byte[] bytes, int offset, int length)
    • parseLong

      public static long parseLong(String hex, int start, int end)
    • 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 <T> Constructor<T> getProtectedConstructor(Class<T> 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