public final class org.bouncycastle.util.Strings
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.bouncycastle.util.Strings
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 // org.bouncycastle.util.Strings this
0: .line 6
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
return
end local 0 // org.bouncycastle.util.Strings this
LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/util/Strings;
public static java.lang.String fromUTF8ByteArray(byte[]);
descriptor: ([B)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=9, args_size=1
start local 0 // byte[] bytes
0: .line 10
iconst_0
istore 1 /* i */
start local 1 // int i
1: .line 11
iconst_0
istore 2 /* length */
start local 2 // int length
2: .line 13
goto 15
3: .line 15
StackMap locals: int int
StackMap stack:
iinc 2 /* length */ 1
4: .line 16
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 240
iand
sipush 240
if_icmpne 8
5: .line 19
iinc 2 /* length */ 1
6: .line 20
iinc 1 /* i */ 4
7: .line 21
goto 15
8: .line 22
StackMap locals:
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 224
iand
sipush 224
if_icmpne 11
9: .line 24
iinc 1 /* i */ 3
10: .line 25
goto 15
11: .line 26
StackMap locals:
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 192
iand
sipush 192
if_icmpne 14
12: .line 28
iinc 1 /* i */ 2
13: .line 29
goto 15
14: .line 32
StackMap locals:
StackMap stack:
iinc 1 /* i */ 1
15: .line 13
StackMap locals:
StackMap stack:
iload 1 /* i */
aload 0 /* bytes */
arraylength
if_icmplt 3
16: .line 36
iload 2 /* length */
newarray 5
astore 3 /* cs */
start local 3 // char[] cs
17: .line 38
iconst_0
istore 1 /* i */
18: .line 39
iconst_0
istore 2 /* length */
19: .line 41
goto 48
20: .line 45
StackMap locals: char[]
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 240
iand
sipush 240
if_icmpne 29
21: .line 47
aload 0 /* bytes */
iload 1 /* i */
baload
iconst_3
iand
bipush 18
ishl
aload 0 /* bytes */
iload 1 /* i */
iconst_1
iadd
baload
bipush 63
iand
bipush 12
ishl
ior
aload 0 /* bytes */
iload 1 /* i */
iconst_2
iadd
baload
bipush 63
iand
bipush 6
ishl
ior
aload 0 /* bytes */
iload 1 /* i */
iconst_3
iadd
baload
bipush 63
iand
ior
istore 5 /* codePoint */
start local 5 // int codePoint
22: .line 48
iload 5 /* codePoint */
ldc 65536
isub
istore 6 /* U */
start local 6 // int U
23: .line 49
ldc 55296
iload 6 /* U */
bipush 10
ishr
ior
i2c
istore 7 /* W1 */
start local 7 // char W1
24: .line 50
ldc 56320
iload 6 /* U */
sipush 1023
iand
ior
i2c
istore 8 /* W2 */
start local 8 // char W2
25: .line 51
aload 3 /* cs */
iload 2 /* length */
iinc 2 /* length */ 1
iload 7 /* W1 */
castore
26: .line 52
iload 8 /* W2 */
istore 4 /* ch */
start local 4 // char ch
27: .line 53
iinc 1 /* i */ 4
end local 8 // char W2
end local 7 // char W1
end local 6 // int U
end local 5 // int codePoint
28: .line 54
goto 47
end local 4 // char ch
29: .line 55
StackMap locals:
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 224
iand
sipush 224
if_icmpne 37
30: .line 57
aload 0 /* bytes */
iload 1 /* i */
baload
bipush 15
iand
bipush 12
ishl
31: .line 58
aload 0 /* bytes */
iload 1 /* i */
iconst_1
iadd
baload
bipush 63
iand
bipush 6
ishl
32: .line 57
ior
33: .line 58
aload 0 /* bytes */
iload 1 /* i */
iconst_2
iadd
baload
bipush 63
iand
34: .line 57
ior
i2c
istore 4 /* ch */
start local 4 // char ch
35: .line 59
iinc 1 /* i */ 3
36: .line 60
goto 47
end local 4 // char ch
37: .line 61
StackMap locals:
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 208
iand
sipush 208
if_icmpne 41
38: .line 63
aload 0 /* bytes */
iload 1 /* i */
baload
bipush 31
iand
bipush 6
ishl
aload 0 /* bytes */
iload 1 /* i */
iconst_1
iadd
baload
bipush 63
iand
ior
i2c
istore 4 /* ch */
start local 4 // char ch
39: .line 64
iinc 1 /* i */ 2
40: .line 65
goto 47
end local 4 // char ch
41: .line 66
StackMap locals:
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 192
iand
sipush 192
if_icmpne 45
42: .line 68
aload 0 /* bytes */
iload 1 /* i */
baload
bipush 31
iand
bipush 6
ishl
aload 0 /* bytes */
iload 1 /* i */
iconst_1
iadd
baload
bipush 63
iand
ior
i2c
istore 4 /* ch */
start local 4 // char ch
43: .line 69
iinc 1 /* i */ 2
44: .line 70
goto 47
end local 4 // char ch
45: .line 73
StackMap locals:
StackMap stack:
aload 0 /* bytes */
iload 1 /* i */
baload
sipush 255
iand
i2c
istore 4 /* ch */
start local 4 // char ch
46: .line 74
iinc 1 /* i */ 1
47: .line 77
StackMap locals: int
StackMap stack:
aload 3 /* cs */
iload 2 /* length */
iinc 2 /* length */ 1
iload 4 /* ch */
castore
end local 4 // char ch
48: .line 41
StackMap locals:
StackMap stack:
iload 1 /* i */
aload 0 /* bytes */
arraylength
if_icmplt 20
49: .line 80
new java.lang.String
dup
aload 3 /* cs */
invokespecial java.lang.String.<init>:([C)V
areturn
end local 3 // char[] cs
end local 2 // int length
end local 1 // int i
end local 0 // byte[] bytes
LocalVariableTable:
Start End Slot Name Signature
0 50 0 bytes [B
1 50 1 i I
2 50 2 length I
17 50 3 cs [C
27 29 4 ch C
35 37 4 ch C
39 41 4 ch C
43 45 4 ch C
46 48 4 ch C
22 28 5 codePoint I
23 28 6 U I
24 28 7 W1 C
25 28 8 W2 C
MethodParameters:
Name Flags
bytes
public static byte[] toUTF8ByteArray(java.lang.String);
descriptor: (Ljava/lang/String;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 // java.lang.String string
0: .line 85
aload 0 /* string */
invokevirtual java.lang.String.toCharArray:()[C
invokestatic org.bouncycastle.util.Strings.toUTF8ByteArray:([C)[B
areturn
end local 0 // java.lang.String string
LocalVariableTable:
Start End Slot Name Signature
0 1 0 string Ljava/lang/String;
MethodParameters:
Name Flags
string
public static byte[] toUTF8ByteArray(char[]);
descriptor: ([C)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=8, args_size=1
start local 0 // char[] string
0: .line 90
new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
astore 1 /* bOut */
start local 1 // java.io.ByteArrayOutputStream bOut
1: .line 91
aload 0 /* string */
astore 2 /* c */
start local 2 // char[] c
2: .line 92
iconst_0
istore 3 /* i */
start local 3 // int i
3: .line 94
goto 30
4: .line 96
StackMap locals: java.io.ByteArrayOutputStream char[] int
StackMap stack:
aload 2 /* c */
iload 3 /* i */
caload
istore 4 /* ch */
start local 4 // char ch
5: .line 98
iload 4 /* ch */
sipush 128
if_icmpge 8
6: .line 100
aload 1 /* bOut */
iload 4 /* ch */
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
7: .line 101
goto 29
8: .line 102
StackMap locals: int
StackMap stack:
iload 4 /* ch */
sipush 2048
if_icmpge 12
9: .line 104
aload 1 /* bOut */
sipush 192
iload 4 /* ch */
bipush 6
ishr
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
10: .line 105
aload 1 /* bOut */
sipush 128
iload 4 /* ch */
bipush 63
iand
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
11: .line 106
goto 29
12: .line 108
StackMap locals:
StackMap stack:
iload 4 /* ch */
ldc 55296
if_icmplt 26
iload 4 /* ch */
ldc 57343
if_icmpgt 26
13: .line 112
iload 3 /* i */
iconst_1
iadd
aload 2 /* c */
arraylength
if_icmplt 15
14: .line 114
new java.lang.IllegalStateException
dup
ldc "invalid UTF-16 codepoint"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
15: .line 116
StackMap locals:
StackMap stack:
iload 4 /* ch */
istore 5 /* W1 */
start local 5 // char W1
16: .line 117
aload 2 /* c */
iinc 3 /* i */ 1
iload 3 /* i */
caload
istore 4 /* ch */
17: .line 118
iload 4 /* ch */
istore 6 /* W2 */
start local 6 // char W2
18: .line 121
iload 5 /* W1 */
ldc 56319
if_icmple 20
19: .line 123
new java.lang.IllegalStateException
dup
ldc "invalid UTF-16 codepoint"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
20: .line 125
StackMap locals: int int
StackMap stack:
iload 5 /* W1 */
sipush 1023
iand
bipush 10
ishl
iload 6 /* W2 */
sipush 1023
iand
ior
ldc 65536
iadd
istore 7 /* codePoint */
start local 7 // int codePoint
21: .line 126
aload 1 /* bOut */
sipush 240
iload 7 /* codePoint */
bipush 18
ishr
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
22: .line 127
aload 1 /* bOut */
sipush 128
iload 7 /* codePoint */
bipush 12
ishr
bipush 63
iand
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
23: .line 128
aload 1 /* bOut */
sipush 128
iload 7 /* codePoint */
bipush 6
ishr
bipush 63
iand
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
24: .line 129
aload 1 /* bOut */
sipush 128
iload 7 /* codePoint */
bipush 63
iand
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
end local 7 // int codePoint
end local 6 // char W2
end local 5 // char W1
25: .line 130
goto 29
26: .line 133
StackMap locals:
StackMap stack:
aload 1 /* bOut */
sipush 224
iload 4 /* ch */
bipush 12
ishr
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
27: .line 134
aload 1 /* bOut */
sipush 128
iload 4 /* ch */
bipush 6
ishr
bipush 63
iand
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
28: .line 135
aload 1 /* bOut */
sipush 128
iload 4 /* ch */
bipush 63
iand
ior
invokevirtual java.io.ByteArrayOutputStream.write:(I)V
29: .line 138
StackMap locals:
StackMap stack:
iinc 3 /* i */ 1
end local 4 // char ch
30: .line 94
StackMap locals:
StackMap stack:
iload 3 /* i */
aload 2 /* c */
arraylength
if_icmplt 4
31: .line 141
aload 1 /* bOut */
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
areturn
end local 3 // int i
end local 2 // char[] c
end local 1 // java.io.ByteArrayOutputStream bOut
end local 0 // char[] string
LocalVariableTable:
Start End Slot Name Signature
0 32 0 string [C
1 32 1 bOut Ljava/io/ByteArrayOutputStream;
2 32 2 c [C
3 32 3 i I
5 30 4 ch C
16 25 5 W1 C
18 25 6 W2 C
21 25 7 codePoint I
MethodParameters:
Name Flags
string
public static java.lang.String toUpperCase(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=1
start local 0 // java.lang.String string
0: .line 152
iconst_0
istore 1 /* changed */
start local 1 // boolean changed
1: .line 153
aload 0 /* string */
invokevirtual java.lang.String.toCharArray:()[C
astore 2 /* chars */
start local 2 // char[] chars
2: .line 155
iconst_0
istore 3 /* i */
start local 3 // int i
3: goto 9
4: .line 157
StackMap locals: int char[] int
StackMap stack:
aload 2 /* chars */
iload 3 /* i */
caload
istore 4 /* ch */
start local 4 // char ch
5: .line 158
bipush 97
iload 4 /* ch */
if_icmpgt 8
bipush 122
iload 4 /* ch */
if_icmplt 8
6: .line 160
iconst_1
istore 1 /* changed */
7: .line 161
aload 2 /* chars */
iload 3 /* i */
iload 4 /* ch */
bipush 97
isub
bipush 65
iadd
i2c
castore
end local 4 // char ch
8: .line 155
StackMap locals:
StackMap stack:
iinc 3 /* i */ 1
StackMap locals:
StackMap stack:
9: iload 3 /* i */
aload 2 /* chars */
arraylength
if_icmpne 4
end local 3 // int i
10: .line 165
iload 1 /* changed */
ifeq 12
11: .line 167
new java.lang.String
dup
aload 2 /* chars */
invokespecial java.lang.String.<init>:([C)V
areturn
12: .line 170
StackMap locals:
StackMap stack:
aload 0 /* string */
areturn
end local 2 // char[] chars
end local 1 // boolean changed
end local 0 // java.lang.String string
LocalVariableTable:
Start End Slot Name Signature
0 13 0 string Ljava/lang/String;
1 13 1 changed Z
2 13 2 chars [C
3 10 3 i I
5 8 4 ch C
MethodParameters:
Name Flags
string
public static java.lang.String toLowerCase(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=1
start local 0 // java.lang.String string
0: .line 181
iconst_0
istore 1 /* changed */
start local 1 // boolean changed
1: .line 182
aload 0 /* string */
invokevirtual java.lang.String.toCharArray:()[C
astore 2 /* chars */
start local 2 // char[] chars
2: .line 184
iconst_0
istore 3 /* i */
start local 3 // int i
3: goto 9
4: .line 186
StackMap locals: int char[] int
StackMap stack:
aload 2 /* chars */
iload 3 /* i */
caload
istore 4 /* ch */
start local 4 // char ch
5: .line 187
bipush 65
iload 4 /* ch */
if_icmpgt 8
bipush 90
iload 4 /* ch */
if_icmplt 8
6: .line 189
iconst_1
istore 1 /* changed */
7: .line 190
aload 2 /* chars */
iload 3 /* i */
iload 4 /* ch */
bipush 65
isub
bipush 97
iadd
i2c
castore
end local 4 // char ch
8: .line 184
StackMap locals:
StackMap stack:
iinc 3 /* i */ 1
StackMap locals:
StackMap stack:
9: iload 3 /* i */
aload 2 /* chars */
arraylength
if_icmpne 4
end local 3 // int i
10: .line 194
iload 1 /* changed */
ifeq 12
11: .line 196
new java.lang.String
dup
aload 2 /* chars */
invokespecial java.lang.String.<init>:([C)V
areturn
12: .line 199
StackMap locals:
StackMap stack:
aload 0 /* string */
areturn
end local 2 // char[] chars
end local 1 // boolean changed
end local 0 // java.lang.String string
LocalVariableTable:
Start End Slot Name Signature
0 13 0 string Ljava/lang/String;
1 13 1 changed Z
2 13 2 chars [C
3 10 3 i I
5 8 4 ch C
MethodParameters:
Name Flags
string
public static byte[] toByteArray(char[]);
descriptor: ([C)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 // char[] chars
0: .line 204
aload 0 /* chars */
arraylength
newarray 8
astore 1 /* bytes */
start local 1 // byte[] bytes
1: .line 206
iconst_0
istore 2 /* i */
start local 2 // int i
2: goto 5
3: .line 208
StackMap locals: byte[] int
StackMap stack:
aload 1 /* bytes */
iload 2 /* i */
aload 0 /* chars */
iload 2 /* i */
caload
i2b
bastore
4: .line 206
iinc 2 /* i */ 1
StackMap locals:
StackMap stack:
5: iload 2 /* i */
aload 1 /* bytes */
arraylength
if_icmpne 3
end local 2 // int i
6: .line 211
aload 1 /* bytes */
areturn
end local 1 // byte[] bytes
end local 0 // char[] chars
LocalVariableTable:
Start End Slot Name Signature
0 7 0 chars [C
1 7 1 bytes [B
2 6 2 i I
MethodParameters:
Name Flags
chars
public static byte[] toByteArray(java.lang.String);
descriptor: (Ljava/lang/String;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=1
start local 0 // java.lang.String string
0: .line 216
aload 0 /* string */
invokevirtual java.lang.String.length:()I
newarray 8
astore 1 /* bytes */
start local 1 // byte[] bytes
1: .line 218
iconst_0
istore 2 /* i */
start local 2 // int i
2: goto 6
3: .line 220
StackMap locals: byte[] int
StackMap stack:
aload 0 /* string */
iload 2 /* i */
invokevirtual java.lang.String.charAt:(I)C
istore 3 /* ch */
start local 3 // char ch
4: .line 222
aload 1 /* bytes */
iload 2 /* i */
iload 3 /* ch */
i2b
bastore
end local 3 // char ch
5: .line 218
iinc 2 /* i */ 1
StackMap locals:
StackMap stack:
6: iload 2 /* i */
aload 1 /* bytes */
arraylength
if_icmpne 3
end local 2 // int i
7: .line 225
aload 1 /* bytes */
areturn
end local 1 // byte[] bytes
end local 0 // java.lang.String string
LocalVariableTable:
Start End Slot Name Signature
0 8 0 string Ljava/lang/String;
1 8 1 bytes [B
2 7 2 i I
4 5 3 ch C
MethodParameters:
Name Flags
string
public static java.lang.String[] split(java.lang.String, char);
descriptor: (Ljava/lang/String;C)[Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=7, args_size=2
start local 0 // java.lang.String input
start local 1 // char delimiter
0: .line 230
new java.util.Vector
dup
invokespecial java.util.Vector.<init>:()V
astore 2 /* v */
start local 2 // java.util.Vector v
1: .line 231
iconst_1
istore 3 /* moreTokens */
start local 3 // boolean moreTokens
2: .line 234
goto 11
3: .line 236
StackMap locals: java.util.Vector int
StackMap stack:
aload 0 /* input */
iload 1 /* delimiter */
invokevirtual java.lang.String.indexOf:(I)I
istore 5 /* tokenLocation */
start local 5 // int tokenLocation
4: .line 237
iload 5 /* tokenLocation */
ifle 9
5: .line 239
aload 0 /* input */
iconst_0
iload 5 /* tokenLocation */
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 4 /* subString */
start local 4 // java.lang.String subString
6: .line 240
aload 2 /* v */
aload 4 /* subString */
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
7: .line 241
aload 0 /* input */
iload 5 /* tokenLocation */
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 0 /* input */
8: .line 242
goto 11
end local 4 // java.lang.String subString
9: .line 245
StackMap locals: java.lang.String int java.util.Vector int top int
StackMap stack:
iconst_0
istore 3 /* moreTokens */
10: .line 246
aload 2 /* v */
aload 0 /* input */
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
end local 5 // int tokenLocation
11: .line 234
StackMap locals: java.lang.String int java.util.Vector int
StackMap stack:
iload 3 /* moreTokens */
ifne 3
12: .line 250
aload 2 /* v */
invokevirtual java.util.Vector.size:()I
anewarray java.lang.String
astore 5 /* res */
start local 5 // java.lang.String[] res
13: .line 252
iconst_0
istore 6 /* i */
start local 6 // int i
14: goto 17
15: .line 254
StackMap locals: java.lang.String int java.util.Vector int top java.lang.String[] int
StackMap stack:
aload 5 /* res */
iload 6 /* i */
aload 2 /* v */
iload 6 /* i */
invokevirtual java.util.Vector.elementAt:(I)Ljava/lang/Object;
checkcast java.lang.String
aastore
16: .line 252
iinc 6 /* i */ 1
StackMap locals:
StackMap stack:
17: iload 6 /* i */
aload 5 /* res */
arraylength
if_icmpne 15
end local 6 // int i
18: .line 256
aload 5 /* res */
areturn
end local 5 // java.lang.String[] res
end local 3 // boolean moreTokens
end local 2 // java.util.Vector v
end local 1 // char delimiter
end local 0 // java.lang.String input
LocalVariableTable:
Start End Slot Name Signature
0 19 0 input Ljava/lang/String;
0 19 1 delimiter C
1 19 2 v Ljava/util/Vector;
2 19 3 moreTokens Z
6 9 4 subString Ljava/lang/String;
4 11 5 tokenLocation I
13 19 5 res [Ljava/lang/String;
14 18 6 i I
MethodParameters:
Name Flags
input
delimiter
}
SourceFile: "Strings.java"