public final class com.ctc.wstx.util.URLUtil
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.ctc.wstx.util.URLUtil
super_class: java.lang.Object
{
private static final java.util.regex.Pattern URI_WINDOWS_FILE_PATTERN;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "^file:///\\p{Alpha}|.*$"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic com.ctc.wstx.util.URLUtil.URI_WINDOWS_FILE_PATTERN:Ljava/util/regex/Pattern;
return
LocalVariableTable:
Start End Slot Name Signature
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
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/ctc/wstx/util/URLUtil;
public static java.net.URL urlFromSystemId(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
invokestatic com.ctc.wstx.util.URLUtil.cleanSystemId:(Ljava/lang/String;)Ljava/lang/String;
astore 0
1: aload 0
bipush 58
iconst_0
invokevirtual java.lang.String.indexOf:(II)I
istore 1
start local 1 2: iload 1
iconst_3
if_icmplt 5
iload 1
bipush 8
if_icmpgt 5
3: new java.net.URL
dup
aload 0
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
4: areturn
5: StackMap locals: int
StackMap stack:
new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
astore 2
start local 2 6: getstatic java.io.File.separatorChar:C
istore 3
start local 3 7: iload 3
bipush 47
if_icmpeq 9
8: aload 2
iload 3
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
astore 2
end local 3 9: StackMap locals: java.lang.String
StackMap stack:
aload 2
invokevirtual java.lang.String.length:()I
ifle 11
aload 2
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 47
if_icmpeq 11
10: new java.lang.StringBuilder
dup
ldc "/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 2
11: StackMap locals:
StackMap stack:
new java.net.URL
dup
ldc "file"
ldc ""
aload 2
invokespecial java.net.URL.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
12: areturn
end local 2 end local 1 13: StackMap locals: java.lang.String
StackMap stack: java.net.MalformedURLException
astore 1
start local 1 14: aload 1
aload 0
invokestatic com.ctc.wstx.util.URLUtil.throwIOException:(Ljava/lang/Exception;Ljava/lang/String;)V
15: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 sysId Ljava/lang/String;
2 13 1 ix I
6 13 2 absPath Ljava/lang/String;
7 9 3 sep C
14 16 1 e Ljava/net/MalformedURLException;
Exception table:
from to target type
0 4 13 Class java.net.MalformedURLException
5 12 13 Class java.net.MalformedURLException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
sysId
public static java.net.URI uriFromSystemId(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/net/URI;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
bipush 124
iconst_0
invokevirtual java.lang.String.indexOf:(II)I
ifle 4
1: getstatic com.ctc.wstx.util.URLUtil.URI_WINDOWS_FILE_PATTERN:Ljava/util/regex/Pattern;
aload 0
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 4
2: new java.net.URI
dup
aload 0
bipush 124
bipush 58
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokespecial java.net.URI.<init>:(Ljava/lang/String;)V
3: areturn
4: StackMap locals:
StackMap stack:
aload 0
bipush 58
iconst_0
invokevirtual java.lang.String.indexOf:(II)I
istore 1
start local 1 5: iload 1
iconst_3
if_icmplt 8
iload 1
bipush 8
if_icmpgt 8
6: new java.net.URI
dup
aload 0
invokespecial java.net.URI.<init>:(Ljava/lang/String;)V
7: areturn
8: StackMap locals: int
StackMap stack:
new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
astore 2
start local 2 9: getstatic java.io.File.separatorChar:C
istore 3
start local 3 10: iload 3
bipush 47
if_icmpeq 12
11: aload 2
iload 3
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
astore 2
12: StackMap locals: java.lang.String int
StackMap stack:
aload 2
invokevirtual java.lang.String.length:()I
ifle 14
aload 2
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 47
if_icmpeq 14
13: new java.lang.StringBuilder
dup
ldc "/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 2
14: StackMap locals:
StackMap stack:
new java.net.URI
dup
ldc "file"
aload 2
aconst_null
invokespecial java.net.URI.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
15: areturn
end local 3 end local 2 end local 1 16: StackMap locals: java.lang.String
StackMap stack: java.net.URISyntaxException
astore 1
start local 1 17: aload 1
aload 0
invokestatic com.ctc.wstx.util.URLUtil.throwIOException:(Ljava/lang/Exception;Ljava/lang/String;)V
18: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 sysId Ljava/lang/String;
5 16 1 ix I
9 16 2 absPath Ljava/lang/String;
10 16 3 sep C
17 19 1 e Ljava/net/URISyntaxException;
Exception table:
from to target type
0 3 16 Class java.net.URISyntaxException
4 7 16 Class java.net.URISyntaxException
8 15 16 Class java.net.URISyntaxException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
sysId final
public static java.net.URL urlFromSystemId(java.lang.String, java.net.URL);
descriptor: (Ljava/lang/String;Ljava/net/URL;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: aload 0
invokestatic com.ctc.wstx.util.URLUtil.urlFromSystemId:(Ljava/lang/String;)Ljava/net/URL;
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokestatic com.ctc.wstx.util.URLUtil.cleanSystemId:(Ljava/lang/String;)Ljava/lang/String;
astore 0
3: new java.net.URL
dup
aload 1
aload 0
invokespecial java.net.URL.<init>:(Ljava/net/URL;Ljava/lang/String;)V
4: areturn
5: StackMap locals:
StackMap stack: java.net.MalformedURLException
astore 2
start local 2 6: aload 2
aload 0
invokestatic com.ctc.wstx.util.URLUtil.throwIOException:(Ljava/lang/Exception;Ljava/lang/String;)V
7: aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 sysId Ljava/lang/String;
0 8 1 ctxt Ljava/net/URL;
6 8 2 e Ljava/net/MalformedURLException;
Exception table:
from to target type
2 4 5 Class java.net.MalformedURLException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
sysId
ctxt
public static java.net.URL urlFromCurrentDir();
descriptor: ()Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: new java.io.File
dup
ldc "a"
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getAbsoluteFile:()Ljava/io/File;
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
astore 0
start local 0 1: aload 0
invokestatic com.ctc.wstx.util.URLUtil.toURL:(Ljava/io/File;)Ljava/net/URL;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 2 0 parent Ljava/io/File;
Exceptions:
throws java.io.IOException
public static java.io.InputStream inputStreamFromURL(java.net.URL);
descriptor: (Ljava/net/URL;)Ljava/io/InputStream;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: ldc "file"
aload 0
invokevirtual java.net.URL.getProtocol:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 7
1: aload 0
invokevirtual java.net.URL.getHost:()Ljava/lang/String;
astore 1
start local 1 2: aload 1
ifnull 3
aload 1
invokevirtual java.lang.String.length:()I
ifne 7
3: StackMap locals: java.lang.String
StackMap stack:
aload 0
invokevirtual java.net.URL.getPath:()Ljava/lang/String;
astore 2
start local 2 4: aload 2
bipush 37
invokevirtual java.lang.String.indexOf:(I)I
iflt 6
5: aload 2
ldc "UTF-8"
invokestatic java.net.URLDecoder.decode:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 2
6: StackMap locals: java.lang.String
StackMap stack:
new java.io.FileInputStream
dup
aload 2
invokespecial java.io.FileInputStream.<init>:(Ljava/lang/String;)V
areturn
end local 2 end local 1 7: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.net.URL.openStream:()Ljava/io/InputStream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 url Ljava/net/URL;
2 7 1 host Ljava/lang/String;
4 7 2 path Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
url
public static java.io.OutputStream outputStreamFromURL(java.net.URL);
descriptor: (Ljava/net/URL;)Ljava/io/OutputStream;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: ldc "file"
aload 0
invokevirtual java.net.URL.getProtocol:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 4
1: aload 0
invokevirtual java.net.URL.getHost:()Ljava/lang/String;
astore 1
start local 1 2: aload 1
ifnull 3
aload 1
invokevirtual java.lang.String.length:()I
ifne 4
3: StackMap locals: java.lang.String
StackMap stack:
new java.io.FileOutputStream
dup
aload 0
invokevirtual java.net.URL.getPath:()Ljava/lang/String;
invokespecial java.io.FileOutputStream.<init>:(Ljava/lang/String;)V
areturn
end local 1 4: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.net.URL.openConnection:()Ljava/net/URLConnection;
invokevirtual java.net.URLConnection.getOutputStream:()Ljava/io/OutputStream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 url Ljava/net/URL;
2 4 1 host Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
url
public static java.net.URL toURL(java.io.File);
descriptor: (Ljava/io/File;)Ljava/net/URL;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.toURI:()Ljava/net/URI;
invokevirtual java.net.URI.toURL:()Ljava/net/URL;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 f Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
f
private static java.lang.String cleanSystemId(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
bipush 124
invokevirtual java.lang.String.indexOf:(I)I
istore 1
start local 1 1: iload 1
ifle 5
getstatic com.ctc.wstx.util.URLUtil.URI_WINDOWS_FILE_PATTERN:Ljava/util/regex/Pattern;
aload 0
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 5
2: new java.lang.StringBuilder
dup
aload 0
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
astore 2
start local 2 3: aload 2
iload 1
bipush 58
invokevirtual java.lang.StringBuilder.setCharAt:(IC)V
4: aload 2
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 2 5: StackMap locals: int
StackMap stack:
aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 sysId Ljava/lang/String;
1 6 1 ix I
3 5 2 sb Ljava/lang/StringBuilder;
MethodParameters:
Name Flags
sysId final
private static void throwIOException(java.lang.Exception, java.lang.String);
descriptor: (Ljava/lang/Exception;Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: new java.lang.StringBuilder
dup
ldc "[resolving systemId '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "']: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
invokevirtual java.lang.Exception.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 2
start local 2 1: aload 2
aload 0
invokestatic com.ctc.wstx.util.ExceptionUtil.constructIOException:(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/io/IOException;
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 mex Ljava/lang/Exception;
0 2 1 sysId Ljava/lang/String;
1 2 2 msg Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
mex
sysId
}
SourceFile: "URLUtil.java"