public class org.apache.cassandra.utils.Hex
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.Hex
super_class: java.lang.Object
{
private static final java.lang.reflect.Constructor<java.lang.String> stringConstructor;
descriptor: Ljava/lang/reflect/Constructor;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/reflect/Constructor<Ljava/lang/String;>;
private static final byte[] charToByte;
descriptor: [B
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static final char[] byteToChar;
descriptor: [C
flags: (0x0018) ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=1, args_size=0
0: ldc Ljava/lang/String;
iconst_3
anewarray java.lang.Class
dup
iconst_0
getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
aastore
dup
iconst_1
getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
aastore
dup
iconst_2
ldc [C
aastore
invokestatic org.apache.cassandra.utils.Hex.getProtectedConstructor:(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
putstatic org.apache.cassandra.utils.Hex.stringConstructor:Ljava/lang/reflect/Constructor;
1: sipush 256
newarray 8
putstatic org.apache.cassandra.utils.Hex.charToByte:[B
2: ldc Lorg/apache/cassandra/utils/Hex;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.utils.Hex.logger:Lorg/slf4j/Logger;
3: bipush 16
newarray 5
putstatic org.apache.cassandra.utils.Hex.byteToChar:[C
4: iconst_0
istore 0
start local 0 5: goto 14
6: StackMap locals: int
StackMap stack:
iload 0
bipush 48
if_icmplt 8
iload 0
bipush 57
if_icmpgt 8
7: getstatic org.apache.cassandra.utils.Hex.charToByte:[B
iload 0
iload 0
bipush 48
isub
i2b
bastore
goto 13
8: StackMap locals:
StackMap stack:
iload 0
bipush 65
if_icmplt 10
iload 0
bipush 70
if_icmpgt 10
9: getstatic org.apache.cassandra.utils.Hex.charToByte:[B
iload 0
iload 0
bipush 65
isub
bipush 10
iadd
i2b
bastore
goto 13
10: StackMap locals:
StackMap stack:
iload 0
bipush 97
if_icmplt 12
iload 0
bipush 102
if_icmpgt 12
11: getstatic org.apache.cassandra.utils.Hex.charToByte:[B
iload 0
iload 0
bipush 97
isub
bipush 10
iadd
i2b
bastore
goto 13
12: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.Hex.charToByte:[B
iload 0
iconst_m1
bastore
13: StackMap locals:
StackMap stack:
iload 0
iconst_1
iadd
i2c
istore 0
StackMap locals:
StackMap stack:
14: iload 0
getstatic org.apache.cassandra.utils.Hex.charToByte:[B
arraylength
if_icmplt 6
end local 0 15: iconst_0
istore 0
start local 0 16: goto 19
17: StackMap locals: int
StackMap stack:
getstatic org.apache.cassandra.utils.Hex.byteToChar:[C
iload 0
iload 0
invokestatic java.lang.Integer.toHexString:(I)Ljava/lang/String;
iconst_0
invokevirtual java.lang.String.charAt:(I)C
castore
18: iinc 0 1
StackMap locals:
StackMap stack:
19: iload 0
bipush 16
if_icmplt 17
end local 0 20: return
LocalVariableTable:
Start End Slot Name Signature
5 15 0 c C
16 20 0 i I
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/Hex;
public static byte[] hexToBytes(java.lang.String);
descriptor: (Ljava/lang/String;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=5, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.String.length:()I
iconst_2
irem
iconst_1
if_icmpne 2
1: new java.lang.NumberFormatException
dup
ldc "An hex string representing bytes must have an even length"
invokespecial java.lang.NumberFormatException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.String.length:()I
iconst_2
idiv
newarray 8
astore 1
start local 1 3: iconst_0
istore 2
start local 2 4: goto 11
5: StackMap locals: byte[] int
StackMap stack:
getstatic org.apache.cassandra.utils.Hex.charToByte:[B
aload 0
iload 2
iconst_2
imul
invokevirtual java.lang.String.charAt:(I)C
baload
istore 3
start local 3 6: getstatic org.apache.cassandra.utils.Hex.charToByte:[B
aload 0
iload 2
iconst_2
imul
iconst_1
iadd
invokevirtual java.lang.String.charAt:(I)C
baload
istore 4
start local 4 7: iload 3
iconst_m1
if_icmpeq 8
iload 4
iconst_m1
if_icmpne 9
8: StackMap locals: int int
StackMap stack:
new java.lang.NumberFormatException
dup
new java.lang.StringBuilder
dup
ldc "Non-hex characters in "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.NumberFormatException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
aload 1
iload 2
iload 3
iconst_4
ishl
iload 4
ior
i2b
bastore
end local 4 end local 3 10: iinc 2 1
StackMap locals:
StackMap stack:
11: iload 2
aload 1
arraylength
if_icmplt 5
end local 2 12: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 str Ljava/lang/String;
3 13 1 bytes [B
4 12 2 i I
6 10 3 halfByte1 B
7 10 4 halfByte2 B
MethodParameters:
Name Flags
str
public static java.lang.String bytesToHex(byte[]);
descriptor: ([B)Ljava/lang/String;
flags: (0x0089) ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
aload 0
arraylength
invokestatic org.apache.cassandra.utils.Hex.bytesToHex:([BII)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bytes [B
MethodParameters:
Name Flags
bytes
public static java.lang.String bytesToHex(byte[], int, int);
descriptor: ([BII)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=6, args_size=3
start local 0 start local 1 start local 2 0: iload 2
iconst_2
imul
newarray 5
astore 3
start local 3 1: iconst_0
istore 4
start local 4 2: goto 7
3: StackMap locals: char[] int
StackMap stack:
aload 0
iload 4
iload 1
iadd
baload
istore 5
start local 5 4: aload 3
iload 4
iconst_2
imul
getstatic org.apache.cassandra.utils.Hex.byteToChar:[C
iload 5
sipush 240
iand
iconst_4
ishr
caload
castore
5: aload 3
iconst_1
iload 4
iconst_2
imul
iadd
getstatic org.apache.cassandra.utils.Hex.byteToChar:[C
iload 5
bipush 15
iand
caload
castore
end local 5 6: iinc 4 1
StackMap locals:
StackMap stack:
7: iload 4
iload 2
if_icmplt 3
end local 4 8: aload 3
invokestatic org.apache.cassandra.utils.Hex.wrapCharArray:([C)Ljava/lang/String;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 bytes [B
0 9 1 offset I
0 9 2 length I
1 9 3 c [C
2 8 4 i I
4 6 5 bint I
MethodParameters:
Name Flags
bytes
offset
length
public static java.lang.String wrapCharArray(char[]);
descriptor: ([C)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aconst_null
astore 1
start local 1 3: getstatic org.apache.cassandra.utils.Hex.stringConstructor:Ljava/lang/reflect/Constructor;
ifnull 15
4: getstatic org.apache.cassandra.utils.Hex.stringConstructor:Ljava/lang/reflect/Constructor;
iconst_3
anewarray java.lang.Object
dup
iconst_0
iconst_0
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 0
arraylength
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
aload 0
aastore
invokevirtual java.lang.reflect.Constructor.newInstance:([Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 1
5: goto 15
6: StackMap locals: char[] java.lang.String
StackMap stack: java.lang.reflect.InvocationTargetException
astore 2
start local 2 7: aload 2
invokevirtual java.lang.reflect.InvocationTargetException.getCause:()Ljava/lang/Throwable;
astore 3
start local 3 8: getstatic org.apache.cassandra.utils.Hex.logger:Lorg/slf4j/Logger;
ldc "Underlying string constructor threw an error: {}"
9: aload 3
ifnonnull 10
aload 2
invokevirtual java.lang.reflect.InvocationTargetException.getMessage:()Ljava/lang/String;
goto 11
StackMap locals: char[] java.lang.String java.lang.reflect.InvocationTargetException java.lang.Throwable
StackMap stack: org.slf4j.Logger java.lang.String
10: aload 3
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
11: StackMap locals: char[] java.lang.String java.lang.reflect.InvocationTargetException java.lang.Throwable
StackMap stack: org.slf4j.Logger java.lang.String java.lang.String
invokeinterface org.slf4j.Logger.error:(Ljava/lang/String;Ljava/lang/Object;)V
end local 3 end local 2 12: goto 15
13: StackMap locals: char[] java.lang.String
StackMap stack: java.lang.Exception
astore 2
start local 2 14: aload 2
invokestatic org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable:(Ljava/lang/Throwable;)V
end local 2 15: StackMap locals:
StackMap stack:
aload 1
ifnonnull 16
new java.lang.String
dup
aload 0
invokespecial java.lang.String.<init>:([C)V
goto 17
StackMap locals:
StackMap stack:
16: aload 1
StackMap locals:
StackMap stack: java.lang.String
17: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 c [C
3 18 1 s Ljava/lang/String;
7 12 2 ite Ljava/lang/reflect/InvocationTargetException;
8 12 3 cause Ljava/lang/Throwable;
14 15 2 e Ljava/lang/Exception;
Exception table:
from to target type
4 5 6 Class java.lang.reflect.InvocationTargetException
4 5 13 Class java.lang.Exception
MethodParameters:
Name Flags
c
public static <T> java.lang.reflect.Constructor<T> getProtectedConstructor(java.lang.Class<T>, java.lang.Class<?>[]);
descriptor: (Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
flags: (0x0089) ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.lang.Class.getDeclaredConstructor:([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
astore 2
start local 2 1: aload 2
iconst_1
invokevirtual java.lang.reflect.Constructor.setAccessible:(Z)V
2: aload 2
3: areturn
end local 2 4: StackMap locals:
StackMap stack: java.lang.Exception
pop
5: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 klass Ljava/lang/Class<TT;>;
0 6 1 paramTypes [Ljava/lang/Class;
1 4 2 c Ljava/lang/reflect/Constructor<TT;>;
Exception table:
from to target type
0 3 4 Class java.lang.Exception
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;[Ljava/lang/Class<*>;)Ljava/lang/reflect/Constructor<TT;>;
MethodParameters:
Name Flags
klass
paramTypes
}
SourceFile: "Hex.java"