public final class org.apache.tomcat.util.buf.UriUtil
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.tomcat.util.buf.UriUtil
super_class: java.lang.Object
{
private static final char[] HEX;
descriptor: [C
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern PATTERN_EXCLAMATION_MARK;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern PATTERN_CARET;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern PATTERN_ASTERISK;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern PATTERN_CUSTOM;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.String REPLACE_CUSTOM;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.String WAR_SEPARATOR;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=7, 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.tomcat.util.buf.UriUtil.HEX:[C
2: ldc "!/"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_EXCLAMATION_MARK:Ljava/util/regex/Pattern;
3: ldc "\\^/"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CARET:Ljava/util/regex/Pattern;
4: ldc "\\*/"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_ASTERISK:Ljava/util/regex/Pattern;
5: ldc "org.apache.tomcat.util.buf.UriUtil.WAR_SEPARATOR"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 0
start local 0 6: aload 0
ifnonnull 11
7: ldc "*/"
putstatic org.apache.tomcat.util.buf.UriUtil.WAR_SEPARATOR:Ljava/lang/String;
8: aconst_null
putstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CUSTOM:Ljava/util/regex/Pattern;
9: aconst_null
putstatic org.apache.tomcat.util.buf.UriUtil.REPLACE_CUSTOM:Ljava/lang/String;
10: goto 26
11: StackMap locals: java.lang.String
StackMap stack:
new java.lang.StringBuilder
dup
aload 0
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putstatic org.apache.tomcat.util.buf.UriUtil.WAR_SEPARATOR:Ljava/lang/String;
12: getstatic org.apache.tomcat.util.buf.UriUtil.WAR_SEPARATOR:Ljava/lang/String;
invokestatic java.util.regex.Pattern.quote:(Ljava/lang/String;)Ljava/lang/String;
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CUSTOM:Ljava/util/regex/Pattern;
13: new java.lang.StringBuffer
dup
aload 0
invokevirtual java.lang.String.length:()I
iconst_3
imul
invokespecial java.lang.StringBuffer.<init>:(I)V
astore 1
start local 1 14: aload 0
invokevirtual java.lang.String.getBytes:()[B
astore 2
start local 2 15: iconst_0
istore 3
start local 3 16: goto 24
17: StackMap locals: java.lang.StringBuffer byte[] int
StackMap stack:
aload 2
iload 3
baload
istore 4
start local 4 18: aload 1
bipush 37
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
19: iload 4
bipush 15
iand
istore 5
start local 5 20: iload 4
sipush 240
iand
iconst_4
ishr
istore 6
start local 6 21: aload 1
getstatic org.apache.tomcat.util.buf.UriUtil.HEX:[C
iload 6
caload
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
22: aload 1
getstatic org.apache.tomcat.util.buf.UriUtil.HEX:[C
iload 5
caload
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
end local 6 end local 5 end local 4 23: iinc 3 1
StackMap locals:
StackMap stack:
24: iload 3
aload 2
arraylength
if_icmplt 17
end local 3 25: aload 1
invokevirtual java.lang.StringBuffer.toString:()Ljava/lang/String;
putstatic org.apache.tomcat.util.buf.UriUtil.REPLACE_CUSTOM:Ljava/lang/String;
end local 2 end local 1 end local 0 26: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
6 26 0 custom Ljava/lang/String;
14 26 1 sb Ljava/lang/StringBuffer;
15 26 2 ba [B
16 25 3 j I
18 23 4 toEncode B
20 23 5 low I
21 23 6 high I
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/tomcat/util/buf/UriUtil;
private static boolean isSchemeChar(char);
descriptor: (C)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
invokestatic java.lang.Character.isLetterOrDigit:(C)Z
ifne 1
iload 0
bipush 43
if_icmpeq 1
iload 0
bipush 45
if_icmpeq 1
iload 0
bipush 46
if_icmpeq 1
iconst_0
ireturn
StackMap locals:
StackMap stack:
1: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 c C
MethodParameters:
Name Flags
c
public static boolean hasScheme(java.lang.CharSequence);
descriptor: (Ljava/lang/CharSequence;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
invokeinterface java.lang.CharSequence.length:()I
istore 1
start local 1 1: iconst_0
istore 2
start local 2 2: goto 10
3: StackMap locals: int int
StackMap stack:
aload 0
iload 2
invokeinterface java.lang.CharSequence.charAt:(I)C
istore 3
start local 3 4: iload 3
bipush 58
if_icmpne 7
5: iload 2
ifle 6
iconst_1
ireturn
StackMap locals: int
StackMap stack:
6: iconst_0
ireturn
7: StackMap locals:
StackMap stack:
iload 3
invokestatic org.apache.tomcat.util.buf.UriUtil.isSchemeChar:(C)Z
ifne 9
8: iconst_0
ireturn
end local 3 9: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
10: iload 2
iload 1
if_icmplt 3
end local 2 11: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 uri Ljava/lang/CharSequence;
1 12 1 len I
2 11 2 i I
4 9 3 c C
MethodParameters:
Name Flags
uri
public static java.net.URL buildJarUrl(java.io.File);
descriptor: (Ljava/io/File;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
invokestatic org.apache.tomcat.util.buf.UriUtil.buildJarUrl:(Ljava/io/File;Ljava/lang/String;)Ljava/net/URL;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 jarFile Ljava/io/File;
Exceptions:
throws java.net.MalformedURLException
MethodParameters:
Name Flags
jarFile
public static java.net.URL buildJarUrl(java.io.File, java.lang.String);
descriptor: (Ljava/io/File;Ljava/lang/String;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.io.File.toURI:()Ljava/net/URI;
invokevirtual java.net.URI.toString:()Ljava/lang/String;
aload 1
invokestatic org.apache.tomcat.util.buf.UriUtil.buildJarUrl:(Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 jarFile Ljava/io/File;
0 1 1 entryPath Ljava/lang/String;
Exceptions:
throws java.net.MalformedURLException
MethodParameters:
Name Flags
jarFile
entryPath
public static java.net.URL buildJarUrl(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
invokestatic org.apache.tomcat.util.buf.UriUtil.buildJarUrl:(Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 fileUrlString Ljava/lang/String;
Exceptions:
throws java.net.MalformedURLException
MethodParameters:
Name Flags
fileUrlString
public static java.net.URL buildJarUrl(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokestatic org.apache.tomcat.util.buf.UriUtil.makeSafeForJarUrl:(Ljava/lang/String;)Ljava/lang/String;
astore 2
start local 2 1: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 3
start local 3 2: aload 3
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
3: aload 3
ldc "!/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
4: aload 1
ifnull 6
5: aload 3
aload 1
invokestatic org.apache.tomcat.util.buf.UriUtil.makeSafeForJarUrl:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
6: StackMap locals: java.lang.String java.lang.StringBuilder
StackMap stack:
new java.net.URL
dup
ldc "jar"
aconst_null
iconst_m1
aload 3
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 fileUrlString Ljava/lang/String;
0 7 1 entryPath Ljava/lang/String;
1 7 2 safeString Ljava/lang/String;
2 7 3 sb Ljava/lang/StringBuilder;
Exceptions:
throws java.net.MalformedURLException
MethodParameters:
Name Flags
fileUrlString
entryPath
public static java.net.URL buildJarSafeUrl(java.io.File);
descriptor: (Ljava/io/File;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.toURI:()Ljava/net/URI;
invokevirtual java.net.URI.toString:()Ljava/lang/String;
invokestatic org.apache.tomcat.util.buf.UriUtil.makeSafeForJarUrl:(Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 1: new java.net.URL
dup
aload 1
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 file Ljava/io/File;
1 2 1 safe Ljava/lang/String;
Exceptions:
throws java.net.MalformedURLException
MethodParameters:
Name Flags
file
private static java.lang.String makeSafeForJarUrl(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_EXCLAMATION_MARK:Ljava/util/regex/Pattern;
aload 0
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
ldc "%21/"
invokevirtual java.util.regex.Matcher.replaceAll:(Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 1: getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CARET:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
ldc "%5e/"
invokevirtual java.util.regex.Matcher.replaceAll:(Ljava/lang/String;)Ljava/lang/String;
astore 1
2: getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_ASTERISK:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
ldc "%2a/"
invokevirtual java.util.regex.Matcher.replaceAll:(Ljava/lang/String;)Ljava/lang/String;
astore 1
3: getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CUSTOM:Ljava/util/regex/Pattern;
ifnull 5
4: getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CUSTOM:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
getstatic org.apache.tomcat.util.buf.UriUtil.REPLACE_CUSTOM:Ljava/lang/String;
invokevirtual java.util.regex.Matcher.replaceAll:(Ljava/lang/String;)Ljava/lang/String;
astore 1
5: StackMap locals: java.lang.String
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 input Ljava/lang/String;
1 6 1 tmp Ljava/lang/String;
MethodParameters:
Name Flags
input
public static java.net.URL warToJar(java.net.URL);
descriptor: (Ljava/net/URL;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.net.URL.getFile:()Ljava/lang/String;
astore 1
start local 1 1: aload 1
ldc "*/"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 4
2: aload 1
ldc "\\*/"
ldc "!/"
invokevirtual java.lang.String.replaceFirst:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 1
3: goto 9
StackMap locals: java.lang.String
StackMap stack:
4: aload 1
ldc "^/"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 7
5: aload 1
ldc "\\^/"
ldc "!/"
invokevirtual java.lang.String.replaceFirst:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 1
6: goto 9
StackMap locals:
StackMap stack:
7: getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CUSTOM:Ljava/util/regex/Pattern;
ifnull 9
8: aload 1
getstatic org.apache.tomcat.util.buf.UriUtil.PATTERN_CUSTOM:Ljava/util/regex/Pattern;
invokevirtual java.util.regex.Pattern.pattern:()Ljava/lang/String;
ldc "!/"
invokevirtual java.lang.String.replaceFirst:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 1
9: StackMap locals:
StackMap stack:
new java.net.URL
dup
ldc "jar"
aload 0
invokevirtual java.net.URL.getHost:()Ljava/lang/String;
aload 0
invokevirtual java.net.URL.getPort:()I
aload 1
invokespecial java.net.URL.<init>:(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 warUrl Ljava/net/URL;
1 10 1 file Ljava/lang/String;
Exceptions:
throws java.net.MalformedURLException
MethodParameters:
Name Flags
warUrl
public static java.lang.String getWarSeparator();
descriptor: ()Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.tomcat.util.buf.UriUtil.WAR_SEPARATOR:Ljava/lang/String;
areturn
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "UriUtil.java"