public class sun.net.util.IPAddressUtil
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.net.util.IPAddressUtil
super_class: java.lang.Object
{
private static final int INADDR4SZ;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4
private static final int INADDR16SZ;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 16
private static final int INT16SZ;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 // sun.net.util.IPAddressUtil this
0: .line 28
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
return
end local 0 // sun.net.util.IPAddressUtil this
LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/net/util/IPAddressUtil;
public static byte[] textToNumericFormatV4(java.lang.String);
descriptor: (Ljava/lang/String;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=10, args_size=1
start local 0 // java.lang.String src
0: .line 43
iconst_4
newarray 8
astore 1 /* res */
start local 1 // byte[] res
1: .line 45
lconst_0
lstore 2 /* tmpValue */
start local 2 // long tmpValue
2: .line 46
iconst_0
istore 4 /* currByte */
start local 4 // int currByte
3: .line 47
iconst_1
istore 5 /* newOctet */
start local 5 // boolean newOctet
4: .line 49
aload 0 /* src */
invokevirtual java.lang.String.length:()I
istore 6 /* len */
start local 6 // int len
5: .line 50
iload 6 /* len */
ifeq 6
iload 6 /* len */
bipush 15
if_icmple 7
6: .line 51
StackMap locals: java.lang.String byte[] long int int int
StackMap stack:
aconst_null
areturn
7: .line 78
StackMap locals:
StackMap stack:
iconst_0
istore 7 /* i */
start local 7 // int i
8: goto 24
9: .line 79
StackMap locals: int
StackMap stack:
aload 0 /* src */
iload 7 /* i */
invokevirtual java.lang.String.charAt:(I)C
istore 8 /* c */
start local 8 // char c
10: .line 80
iload 8 /* c */
bipush 46
if_icmpne 17
11: .line 81
iload 5 /* newOctet */
ifne 12
lload 2 /* tmpValue */
lconst_0
lcmp
iflt 12
lload 2 /* tmpValue */
ldc 255
lcmp
ifgt 12
iload 4 /* currByte */
iconst_3
if_icmpne 13
12: .line 82
StackMap locals: int
StackMap stack:
aconst_null
areturn
13: .line 84
StackMap locals:
StackMap stack:
aload 1 /* res */
iload 4 /* currByte */
iinc 4 /* currByte */ 1
lload 2 /* tmpValue */
ldc 255
land
l2i
i2b
bastore
14: .line 85
lconst_0
lstore 2 /* tmpValue */
15: .line 86
iconst_1
istore 5 /* newOctet */
16: .line 87
goto 23
17: .line 88
StackMap locals:
StackMap stack:
iload 8 /* c */
bipush 10
invokestatic java.lang.Character.digit:(CI)I
istore 9 /* digit */
start local 9 // int digit
18: .line 89
iload 9 /* digit */
ifge 20
19: .line 90
aconst_null
areturn
20: .line 92
StackMap locals: int
StackMap stack:
lload 2 /* tmpValue */
ldc 10
lmul
lstore 2 /* tmpValue */
21: .line 93
lload 2 /* tmpValue */
iload 9 /* digit */
i2l
ladd
lstore 2 /* tmpValue */
22: .line 94
iconst_0
istore 5 /* newOctet */
end local 9 // int digit
end local 8 // char c
23: .line 78
StackMap locals:
StackMap stack:
iinc 7 /* i */ 1
StackMap locals:
StackMap stack:
24: iload 7 /* i */
iload 6 /* len */
if_icmplt 9
end local 7 // int i
25: .line 97
iload 5 /* newOctet */
ifne 26
lload 2 /* tmpValue */
lconst_0
lcmp
iflt 26
lload 2 /* tmpValue */
lconst_1
iconst_4
iload 4 /* currByte */
isub
bipush 8
imul
lshl
lcmp
iflt 27
26: .line 98
StackMap locals:
StackMap stack:
aconst_null
areturn
27: .line 100
StackMap locals:
StackMap stack:
iload 4 /* currByte */
tableswitch { // 0 - 3
0: 28
1: 29
2: 30
3: 31
default: 32
}
28: .line 102
StackMap locals:
StackMap stack:
aload 1 /* res */
iconst_0
lload 2 /* tmpValue */
bipush 24
lshr
ldc 255
land
l2i
i2b
bastore
29: .line 104
StackMap locals:
StackMap stack:
aload 1 /* res */
iconst_1
lload 2 /* tmpValue */
bipush 16
lshr
ldc 255
land
l2i
i2b
bastore
30: .line 106
StackMap locals:
StackMap stack:
aload 1 /* res */
iconst_2
lload 2 /* tmpValue */
bipush 8
lshr
ldc 255
land
l2i
i2b
bastore
31: .line 108
StackMap locals:
StackMap stack:
aload 1 /* res */
iconst_3
lload 2 /* tmpValue */
iconst_0
lshr
ldc 255
land
l2i
i2b
bastore
32: .line 110
StackMap locals:
StackMap stack:
aload 1 /* res */
areturn
end local 6 // int len
end local 5 // boolean newOctet
end local 4 // int currByte
end local 2 // long tmpValue
end local 1 // byte[] res
end local 0 // java.lang.String src
LocalVariableTable:
Start End Slot Name Signature
0 33 0 src Ljava/lang/String;
1 33 1 res [B
2 33 2 tmpValue J
3 33 4 currByte I
4 33 5 newOctet Z
5 33 6 len I
8 25 7 i I
10 23 8 c C
18 23 9 digit I
MethodParameters:
Name Flags
src
public static byte[] textToNumericFormatV6(java.lang.String);
descriptor: (Ljava/lang/String;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=18, args_size=1
start local 0 // java.lang.String src
0: .line 126
aload 0 /* src */
invokevirtual java.lang.String.length:()I
iconst_2
if_icmpge 2
1: .line 127
aconst_null
areturn
2: .line 134
StackMap locals:
StackMap stack:
aload 0 /* src */
invokevirtual java.lang.String.toCharArray:()[C
astore 5 /* srcb */
start local 5 // char[] srcb
3: .line 135
bipush 16
newarray 8
astore 6 /* dst */
start local 6 // byte[] dst
4: .line 137
aload 5 /* srcb */
arraylength
istore 7 /* srcb_length */
start local 7 // int srcb_length
5: .line 138
aload 0 /* src */
bipush 37
invokevirtual java.lang.String.indexOf:(I)I
istore 8 /* pc */
start local 8 // int pc
6: .line 139
iload 8 /* pc */
iload 7 /* srcb_length */
iconst_1
isub
if_icmpne 8
7: .line 140
aconst_null
areturn
8: .line 143
StackMap locals: java.lang.String top top top top char[] byte[] int int
StackMap stack:
iload 8 /* pc */
iconst_m1
if_icmpeq 10
9: .line 144
iload 8 /* pc */
istore 7 /* srcb_length */
10: .line 147
StackMap locals:
StackMap stack:
iconst_m1
istore 1 /* colonp */
start local 1 // int colonp
11: .line 148
iconst_0
istore 9 /* i */
start local 9 // int i
12: iconst_0
istore 10 /* j */
start local 10 // int j
13: .line 150
aload 5 /* srcb */
iload 9 /* i */
caload
bipush 58
if_icmpne 16
14: .line 151
aload 5 /* srcb */
iinc 9 /* i */ 1
iload 9 /* i */
caload
bipush 58
if_icmpeq 16
15: .line 152
aconst_null
areturn
16: .line 153
StackMap locals: java.lang.String int top top top char[] byte[] int int int int
StackMap stack:
iload 9 /* i */
istore 11 /* curtok */
start local 11 // int curtok
17: .line 154
iconst_0
istore 3 /* saw_xdigit */
start local 3 // boolean saw_xdigit
18: .line 155
iconst_0
istore 4 /* val */
start local 4 // int val
19: .line 156
goto 66
20: .line 157
StackMap locals: java.lang.String int top int int char[] byte[] int int int int int
StackMap stack:
aload 5 /* srcb */
iload 9 /* i */
iinc 9 /* i */ 1
caload
istore 2 /* ch */
start local 2 // char ch
21: .line 158
iload 2 /* ch */
bipush 16
invokestatic java.lang.Character.digit:(CI)I
istore 12 /* chval */
start local 12 // int chval
22: .line 159
iload 12 /* chval */
iconst_m1
if_icmpeq 29
23: .line 160
iload 4 /* val */
iconst_4
ishl
istore 4 /* val */
24: .line 161
iload 4 /* val */
iload 12 /* chval */
ior
istore 4 /* val */
25: .line 162
iload 4 /* val */
ldc 65535
if_icmple 27
26: .line 163
aconst_null
areturn
27: .line 164
StackMap locals: java.lang.String int int int int char[] byte[] int int int int int int
StackMap stack:
iconst_1
istore 3 /* saw_xdigit */
28: .line 165
goto 66
29: .line 167
StackMap locals:
StackMap stack:
iload 2 /* ch */
bipush 58
if_icmpne 45
30: .line 168
iload 9 /* i */
istore 11 /* curtok */
31: .line 169
iload 3 /* saw_xdigit */
ifne 36
32: .line 170
iload 1 /* colonp */
iconst_m1
if_icmpeq 34
33: .line 171
aconst_null
areturn
34: .line 172
StackMap locals:
StackMap stack:
iload 10 /* j */
istore 1 /* colonp */
35: .line 173
goto 66
36: .line 174
StackMap locals:
StackMap stack:
iload 9 /* i */
iload 7 /* srcb_length */
if_icmpne 38
37: .line 175
aconst_null
areturn
38: .line 177
StackMap locals:
StackMap stack:
iload 10 /* j */
iconst_2
iadd
bipush 16
if_icmple 40
39: .line 178
aconst_null
areturn
40: .line 179
StackMap locals:
StackMap stack:
aload 6 /* dst */
iload 10 /* j */
iinc 10 /* j */ 1
iload 4 /* val */
bipush 8
ishr
sipush 255
iand
i2b
bastore
41: .line 180
aload 6 /* dst */
iload 10 /* j */
iinc 10 /* j */ 1
iload 4 /* val */
sipush 255
iand
i2b
bastore
42: .line 181
iconst_0
istore 3 /* saw_xdigit */
43: .line 182
iconst_0
istore 4 /* val */
44: .line 183
goto 66
45: .line 185
StackMap locals:
StackMap stack:
iload 2 /* ch */
bipush 46
if_icmpne 65
iload 10 /* j */
iconst_4
iadd
bipush 16
if_icmpgt 65
46: .line 186
aload 0 /* src */
iload 11 /* curtok */
iload 7 /* srcb_length */
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 13 /* ia4 */
start local 13 // java.lang.String ia4
47: .line 188
iconst_0
istore 14 /* dot_count */
start local 14 // int dot_count
48: iconst_0
istore 15 /* index */
start local 15 // int index
49: .line 189
goto 52
50: .line 190
StackMap locals: java.lang.String int int
StackMap stack:
iinc 14 /* dot_count */ 1
51: .line 191
iinc 15 /* index */ 1
52: .line 189
StackMap locals:
StackMap stack:
aload 13 /* ia4 */
bipush 46
iload 15 /* index */
invokevirtual java.lang.String.indexOf:(II)I
dup
istore 15 /* index */
iconst_m1
if_icmpne 50
53: .line 193
iload 14 /* dot_count */
iconst_3
if_icmpeq 55
54: .line 194
aconst_null
areturn
55: .line 196
StackMap locals:
StackMap stack:
aload 13 /* ia4 */
invokestatic sun.net.util.IPAddressUtil.textToNumericFormatV4:(Ljava/lang/String;)[B
astore 16 /* v4addr */
start local 16 // byte[] v4addr
56: .line 197
aload 16 /* v4addr */
ifnonnull 58
57: .line 198
aconst_null
areturn
58: .line 200
StackMap locals: byte[]
StackMap stack:
iconst_0
istore 17 /* k */
start local 17 // int k
59: goto 62
60: .line 201
StackMap locals: int
StackMap stack:
aload 6 /* dst */
iload 10 /* j */
iinc 10 /* j */ 1
aload 16 /* v4addr */
iload 17 /* k */
baload
bastore
61: .line 200
iinc 17 /* k */ 1
StackMap locals:
StackMap stack:
62: iload 17 /* k */
iconst_4
if_icmplt 60
end local 17 // int k
63: .line 203
iconst_0
istore 3 /* saw_xdigit */
64: .line 204
goto 67
end local 16 // byte[] v4addr
end local 15 // int index
end local 14 // int dot_count
end local 13 // java.lang.String ia4
65: .line 206
StackMap locals: java.lang.String int int int int char[] byte[] int int int int int int
StackMap stack:
aconst_null
areturn
end local 12 // int chval
end local 2 // char ch
66: .line 156
StackMap locals: java.lang.String int top int int char[] byte[] int int int int int
StackMap stack:
iload 9 /* i */
iload 7 /* srcb_length */
if_icmplt 20
67: .line 208
StackMap locals:
StackMap stack:
iload 3 /* saw_xdigit */
ifeq 72
68: .line 209
iload 10 /* j */
iconst_2
iadd
bipush 16
if_icmple 70
69: .line 210
aconst_null
areturn
70: .line 211
StackMap locals:
StackMap stack:
aload 6 /* dst */
iload 10 /* j */
iinc 10 /* j */ 1
iload 4 /* val */
bipush 8
ishr
sipush 255
iand
i2b
bastore
71: .line 212
aload 6 /* dst */
iload 10 /* j */
iinc 10 /* j */ 1
iload 4 /* val */
sipush 255
iand
i2b
bastore
72: .line 215
StackMap locals:
StackMap stack:
iload 1 /* colonp */
iconst_m1
if_icmpeq 82
73: .line 216
iload 10 /* j */
iload 1 /* colonp */
isub
istore 12 /* n */
start local 12 // int n
74: .line 218
iload 10 /* j */
bipush 16
if_icmpne 76
75: .line 219
aconst_null
areturn
76: .line 220
StackMap locals: int
StackMap stack:
iconst_1
istore 9 /* i */
goto 80
77: .line 221
StackMap locals:
StackMap stack:
aload 6 /* dst */
bipush 16
iload 9 /* i */
isub
aload 6 /* dst */
iload 1 /* colonp */
iload 12 /* n */
iadd
iload 9 /* i */
isub
baload
bastore
78: .line 222
aload 6 /* dst */
iload 1 /* colonp */
iload 12 /* n */
iadd
iload 9 /* i */
isub
iconst_0
bastore
79: .line 220
iinc 9 /* i */ 1
StackMap locals:
StackMap stack:
80: iload 9 /* i */
iload 12 /* n */
if_icmple 77
81: .line 224
bipush 16
istore 10 /* j */
end local 12 // int n
82: .line 226
StackMap locals:
StackMap stack:
iload 10 /* j */
bipush 16
if_icmpeq 84
83: .line 227
aconst_null
areturn
84: .line 228
StackMap locals:
StackMap stack:
aload 6 /* dst */
invokestatic sun.net.util.IPAddressUtil.convertFromIPv4MappedAddress:([B)[B
astore 12 /* newdst */
start local 12 // byte[] newdst
85: .line 229
aload 12 /* newdst */
ifnull 87
86: .line 230
aload 12 /* newdst */
areturn
87: .line 232
StackMap locals: byte[]
StackMap stack:
aload 6 /* dst */
areturn
end local 12 // byte[] newdst
end local 11 // int curtok
end local 10 // int j
end local 9 // int i
end local 8 // int pc
end local 7 // int srcb_length
end local 6 // byte[] dst
end local 5 // char[] srcb
end local 4 // int val
end local 3 // boolean saw_xdigit
end local 1 // int colonp
end local 0 // java.lang.String src
LocalVariableTable:
Start End Slot Name Signature
0 88 0 src Ljava/lang/String;
11 88 1 colonp I
21 66 2 ch C
18 88 3 saw_xdigit Z
19 88 4 val I
3 88 5 srcb [C
4 88 6 dst [B
5 88 7 srcb_length I
6 88 8 pc I
12 88 9 i I
13 88 10 j I
17 88 11 curtok I
22 66 12 chval I
47 65 13 ia4 Ljava/lang/String;
48 65 14 dot_count I
49 65 15 index I
56 65 16 v4addr [B
59 63 17 k I
74 82 12 n I
85 88 12 newdst [B
MethodParameters:
Name Flags
src
public static boolean isIPv4LiteralAddress(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 // java.lang.String src
0: .line 241
aload 0 /* src */
invokestatic sun.net.util.IPAddressUtil.textToNumericFormatV4:(Ljava/lang/String;)[B
ifnull 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 // java.lang.String src
LocalVariableTable:
Start End Slot Name Signature
0 2 0 src Ljava/lang/String;
MethodParameters:
Name Flags
src
public static boolean isIPv6LiteralAddress(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 // java.lang.String src
0: .line 249
aload 0 /* src */
invokestatic sun.net.util.IPAddressUtil.textToNumericFormatV6:(Ljava/lang/String;)[B
ifnull 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 // java.lang.String src
LocalVariableTable:
Start End Slot Name Signature
0 2 0 src Ljava/lang/String;
MethodParameters:
Name Flags
src
public static byte[] convertFromIPv4MappedAddress(byte[]);
descriptor: ([B)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 // byte[] addr
0: .line 260
aload 0 /* addr */
invokestatic sun.net.util.IPAddressUtil.isIPv4MappedAddress:([B)Z
ifeq 4
1: .line 261
iconst_4
newarray 8
astore 1 /* newAddr */
start local 1 // byte[] newAddr
2: .line 262
aload 0 /* addr */
bipush 12
aload 1 /* newAddr */
iconst_0
iconst_4
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
3: .line 263
aload 1 /* newAddr */
areturn
end local 1 // byte[] newAddr
4: .line 265
StackMap locals:
StackMap stack:
aconst_null
areturn
end local 0 // byte[] addr
LocalVariableTable:
Start End Slot Name Signature
0 5 0 addr [B
2 4 1 newAddr [B
MethodParameters:
Name Flags
addr
private static boolean isIPv4MappedAddress(byte[]);
descriptor: ([B)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 // byte[] addr
0: .line 276
aload 0 /* addr */
arraylength
bipush 16
if_icmpge 2
1: .line 277
iconst_0
ireturn
2: .line 279
StackMap locals:
StackMap stack:
aload 0 /* addr */
iconst_0
baload
ifne 10
aload 0 /* addr */
iconst_1
baload
ifne 10
3: .line 280
aload 0 /* addr */
iconst_2
baload
ifne 10
aload 0 /* addr */
iconst_3
baload
ifne 10
4: .line 281
aload 0 /* addr */
iconst_4
baload
ifne 10
aload 0 /* addr */
iconst_5
baload
ifne 10
5: .line 282
aload 0 /* addr */
bipush 6
baload
ifne 10
aload 0 /* addr */
bipush 7
baload
ifne 10
6: .line 283
aload 0 /* addr */
bipush 8
baload
ifne 10
aload 0 /* addr */
bipush 9
baload
ifne 10
7: .line 284
aload 0 /* addr */
bipush 10
baload
iconst_m1
if_icmpne 10
8: .line 285
aload 0 /* addr */
bipush 11
baload
iconst_m1
if_icmpne 10
9: .line 286
iconst_1
ireturn
10: .line 288
StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 // byte[] addr
LocalVariableTable:
Start End Slot Name Signature
0 11 0 addr [B
MethodParameters:
Name Flags
addr
}
SourceFile: "IPAddressUtil.java"