public final class org.apache.catalina.util.URLEncoder implements java.lang.Cloneable
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.catalina.util.URLEncoder
super_class: java.lang.Object
{
private static final char[] hexadecimal;
descriptor: [C
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
public static final org.apache.catalina.util.URLEncoder DEFAULT;
descriptor: Lorg/apache/catalina/util/URLEncoder;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final org.apache.catalina.util.URLEncoder QUERY;
descriptor: Lorg/apache/catalina/util/URLEncoder;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private final java.util.BitSet safeCharacters;
descriptor: Ljava/util/BitSet;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean encodeSpaceAsPlus;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: bipush 16
newarray 5
dup
iconst_0
bipush 48
castore
dup
iconst_1
bipush 49
castore
dup
iconst_2
bipush 50
castore
dup
iconst_3
bipush 51
castore
dup
iconst_4
bipush 52
castore
dup
iconst_5
bipush 53
castore
dup
bipush 6
bipush 54
castore
dup
bipush 7
bipush 55
castore
dup
bipush 8
bipush 56
castore
dup
bipush 9
bipush 57
castore
dup
bipush 10
bipush 65
castore
dup
bipush 11
bipush 66
castore
dup
bipush 12
bipush 67
castore
dup
bipush 13
bipush 68
castore
dup
bipush 14
bipush 69
castore
dup
bipush 15
bipush 70
castore
1: putstatic org.apache.catalina.util.URLEncoder.hexadecimal:[C
2: new org.apache.catalina.util.URLEncoder
dup
invokespecial org.apache.catalina.util.URLEncoder.<init>:()V
putstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
3: new org.apache.catalina.util.URLEncoder
dup
invokespecial org.apache.catalina.util.URLEncoder.<init>:()V
putstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
4: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 45
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
5: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 46
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
6: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 95
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
7: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 126
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
8: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 33
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
9: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 36
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
10: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 38
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
11: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 39
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
12: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 40
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
13: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 41
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
14: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 42
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
15: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 43
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
16: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 44
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
17: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 59
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
18: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 61
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
19: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 58
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
20: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 64
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
21: getstatic org.apache.catalina.util.URLEncoder.DEFAULT:Lorg/apache/catalina/util/URLEncoder;
bipush 47
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
22: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
iconst_1
invokevirtual org.apache.catalina.util.URLEncoder.setEncodeSpaceAsPlus:(Z)V
23: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
bipush 42
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
24: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
bipush 45
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
25: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
bipush 46
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
26: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
bipush 95
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
27: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
bipush 61
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
28: getstatic org.apache.catalina.util.URLEncoder.QUERY:Lorg/apache/catalina/util/URLEncoder;
bipush 38
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
29: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
new java.util.BitSet
dup
sipush 256
invokespecial java.util.BitSet.<init>:(I)V
invokespecial org.apache.catalina.util.URLEncoder.<init>:(Ljava/util/BitSet;)V
1: bipush 97
istore 1
start local 1 2: goto 5
3: StackMap locals: org.apache.catalina.util.URLEncoder int
StackMap stack:
aload 0
iload 1
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
4: iload 1
iconst_1
iadd
i2c
istore 1
StackMap locals:
StackMap stack:
5: iload 1
bipush 122
if_icmple 3
end local 1 6: bipush 65
istore 1
start local 1 7: goto 10
8: StackMap locals:
StackMap stack:
aload 0
iload 1
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
9: iload 1
iconst_1
iadd
i2c
istore 1
StackMap locals:
StackMap stack:
10: iload 1
bipush 90
if_icmple 8
end local 1 11: bipush 48
istore 1
start local 1 12: goto 15
13: StackMap locals:
StackMap stack:
aload 0
iload 1
invokevirtual org.apache.catalina.util.URLEncoder.addSafeCharacter:(C)V
14: iload 1
iconst_1
iadd
i2c
istore 1
StackMap locals:
StackMap stack:
15: iload 1
bipush 57
if_icmple 13
end local 1 16: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/apache/catalina/util/URLEncoder;
2 6 1 i C
7 11 1 i C
12 16 1 i C
private void <init>(java.util.BitSet);
descriptor: (Ljava/util/BitSet;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield org.apache.catalina.util.URLEncoder.encodeSpaceAsPlus:Z
2: aload 0
aload 1
putfield org.apache.catalina.util.URLEncoder.safeCharacters:Ljava/util/BitSet;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/catalina/util/URLEncoder;
0 4 1 safeCharacters Ljava/util/BitSet;
MethodParameters:
Name Flags
safeCharacters
public void addSafeCharacter(char);
descriptor: (C)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.catalina.util.URLEncoder.safeCharacters:Ljava/util/BitSet;
iload 1
invokevirtual java.util.BitSet.set:(I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/catalina/util/URLEncoder;
0 2 1 c C
MethodParameters:
Name Flags
c
public void removeSafeCharacter(char);
descriptor: (C)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.catalina.util.URLEncoder.safeCharacters:Ljava/util/BitSet;
iload 1
invokevirtual java.util.BitSet.clear:(I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/catalina/util/URLEncoder;
0 2 1 c C
MethodParameters:
Name Flags
c
public void setEncodeSpaceAsPlus(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.apache.catalina.util.URLEncoder.encodeSpaceAsPlus:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/catalina/util/URLEncoder;
0 2 1 encodeSpaceAsPlus Z
MethodParameters:
Name Flags
encodeSpaceAsPlus
public java.lang.String encode(java.lang.String, java.nio.charset.Charset);
descriptor: (Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=14, args_size=3
start local 0 start local 1 start local 2 0: bipush 10
istore 3
start local 3 1: new java.lang.StringBuilder
dup
aload 1
invokevirtual java.lang.String.length:()I
invokespecial java.lang.StringBuilder.<init>:(I)V
astore 4
start local 4 2: new java.io.ByteArrayOutputStream
dup
iload 3
invokespecial java.io.ByteArrayOutputStream.<init>:(I)V
astore 5
start local 5 3: new java.io.OutputStreamWriter
dup
aload 5
aload 2
invokespecial java.io.OutputStreamWriter.<init>:(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
astore 6
start local 6 4: iconst_0
istore 7
start local 7 5: goto 32
6: StackMap locals: org.apache.catalina.util.URLEncoder java.lang.String java.nio.charset.Charset int java.lang.StringBuilder java.io.ByteArrayOutputStream java.io.OutputStreamWriter int
StackMap stack:
aload 1
iload 7
invokevirtual java.lang.String.charAt:(I)C
istore 8
start local 8 7: aload 0
getfield org.apache.catalina.util.URLEncoder.safeCharacters:Ljava/util/BitSet;
iload 8
invokevirtual java.util.BitSet.get:(I)Z
ifeq 10
8: aload 4
iload 8
i2c
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
9: goto 31
StackMap locals: int
StackMap stack:
10: aload 0
getfield org.apache.catalina.util.URLEncoder.encodeSpaceAsPlus:Z
ifeq 13
iload 8
bipush 32
if_icmpne 13
11: aload 4
bipush 43
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
12: goto 31
13: StackMap locals:
StackMap stack:
aload 6
iload 8
i2c
invokevirtual java.io.OutputStreamWriter.write:(I)V
14: aload 6
invokevirtual java.io.OutputStreamWriter.flush:()V
15: goto 19
StackMap locals:
StackMap stack: java.io.IOException
16: pop
17: aload 5
invokevirtual java.io.ByteArrayOutputStream.reset:()V
18: goto 31
19: StackMap locals:
StackMap stack:
aload 5
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
astore 9
start local 9 20: iconst_0
istore 10
start local 10 21: goto 29
22: StackMap locals: byte[] int
StackMap stack:
aload 9
iload 10
baload
istore 11
start local 11 23: aload 4
bipush 37
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
24: iload 11
bipush 15
iand
istore 12
start local 12 25: iload 11
sipush 240
iand
iconst_4
ishr
istore 13
start local 13 26: aload 4
getstatic org.apache.catalina.util.URLEncoder.hexadecimal:[C
iload 13
caload
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
27: aload 4
getstatic org.apache.catalina.util.URLEncoder.hexadecimal:[C
iload 12
caload
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
end local 13 end local 12 end local 11 28: iinc 10 1
StackMap locals:
StackMap stack:
29: iload 10
aload 9
arraylength
if_icmplt 22
end local 10 30: aload 5
invokevirtual java.io.ByteArrayOutputStream.reset:()V
end local 9 end local 8 31: StackMap locals:
StackMap stack:
iinc 7 1
StackMap locals:
StackMap stack:
32: iload 7
aload 1
invokevirtual java.lang.String.length:()I
if_icmplt 6
end local 7 33: aload 4
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 34 0 this Lorg/apache/catalina/util/URLEncoder;
0 34 1 path Ljava/lang/String;
0 34 2 charset Ljava/nio/charset/Charset;
1 34 3 maxBytesPerChar I
2 34 4 rewrittenPath Ljava/lang/StringBuilder;
3 34 5 buf Ljava/io/ByteArrayOutputStream;
4 34 6 writer Ljava/io/OutputStreamWriter;
5 33 7 i I
7 31 8 c I
20 31 9 ba [B
21 30 10 j I
23 28 11 toEncode B
25 28 12 low I
26 28 13 high I
Exception table:
from to target type
13 15 16 Class java.io.IOException
MethodParameters:
Name Flags
path
charset
public java.lang.Object clone();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: new org.apache.catalina.util.URLEncoder
dup
aload 0
getfield org.apache.catalina.util.URLEncoder.safeCharacters:Ljava/util/BitSet;
invokevirtual java.util.BitSet.clone:()Ljava/lang/Object;
checkcast java.util.BitSet
invokespecial org.apache.catalina.util.URLEncoder.<init>:(Ljava/util/BitSet;)V
astore 1
start local 1 1: aload 1
aload 0
getfield org.apache.catalina.util.URLEncoder.encodeSpaceAsPlus:Z
invokevirtual org.apache.catalina.util.URLEncoder.setEncodeSpaceAsPlus:(Z)V
2: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/catalina/util/URLEncoder;
1 3 1 result Lorg/apache/catalina/util/URLEncoder;
}
SourceFile: "URLEncoder.java"