public class org.glassfish.grizzly.http.server.util.ExpandJar
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.http.server.util.ExpandJar
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 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/http/server/util/ExpandJar;
public static java.lang.String expand(java.net.URL);
descriptor: (Ljava/net/URL;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "java.io.tmpdir"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.expand:(Ljava/net/URL;Ljava/lang/String;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 jar Ljava/net/URL;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
jar
public static java.lang.String expand(java.net.URL, java.lang.String);
descriptor: (Ljava/net/URL;Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.net.URL.toString:()Ljava/lang/String;
bipush 92
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
astore 2
start local 2 1: aload 2
ldc "!/"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 3
2: aload 2
iconst_0
aload 2
invokevirtual java.lang.String.length:()I
iconst_2
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 2
3: StackMap locals: java.lang.String
StackMap stack:
aload 2
bipush 46
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 3
start local 3 4: iload 3
aload 2
invokevirtual java.lang.String.length:()I
iconst_4
isub
if_icmplt 6
5: aload 2
iconst_0
iload 3
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 2
6: StackMap locals: int
StackMap stack:
aload 2
bipush 47
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 4
start local 4 7: iload 4
iflt 9
8: aload 2
iload 4
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 2
9: StackMap locals: int
StackMap stack:
aload 0
aload 2
aload 1
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.expand:(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 jar Ljava/net/URL;
0 10 1 workFolder Ljava/lang/String;
1 10 2 pathname Ljava/lang/String;
4 10 3 period I
7 10 4 slash I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
jar
workFolder
public static java.lang.String expand(java.net.URL, java.lang.String, java.lang.String);
descriptor: (Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=14, args_size=3
start local 0 start local 1 start local 2 0: new java.io.File
dup
aload 2
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 3
start local 3 1: new java.io.File
dup
aload 3
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 4
start local 4 2: aload 4
invokevirtual java.io.File.mkdir:()Z
ifne 4
3: new java.lang.IllegalStateException
dup
ldc "Unable to create directory: %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 4
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: java.io.File java.io.File
StackMap stack:
aload 0
invokevirtual java.net.URL.openConnection:()Ljava/net/URLConnection;
checkcast java.net.JarURLConnection
astore 5
start local 5 5: aload 5
iconst_0
invokevirtual java.net.JarURLConnection.setUseCaches:(Z)V
6: aconst_null
astore 6
start local 6 7: aconst_null
astore 7
start local 7 8: aload 5
invokevirtual java.net.JarURLConnection.getJarFile:()Ljava/util/jar/JarFile;
astore 6
9: aload 6
invokevirtual java.util.jar.JarFile.entries:()Ljava/util/Enumeration;
astore 8
start local 8 10: goto 24
11: StackMap locals: java.net.URL java.lang.String java.lang.String java.io.File java.io.File java.net.JarURLConnection java.util.jar.JarFile java.io.InputStream java.util.Enumeration
StackMap stack:
aload 8
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.util.jar.JarEntry
astore 9
start local 9 12: aload 9
invokevirtual java.util.jar.JarEntry.getName:()Ljava/lang/String;
astore 10
start local 10 13: aload 10
bipush 47
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 11
start local 11 14: iload 11
iflt 18
15: new java.io.File
dup
aload 4
aload 10
iconst_0
iload 11
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 12
start local 12 16: aload 12
invokevirtual java.io.File.mkdirs:()Z
ifne 18
17: new java.lang.IllegalStateException
dup
ldc "Unable to create directory: %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 12
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 12 18: StackMap locals: java.util.jar.JarEntry java.lang.String int
StackMap stack:
aload 10
ldc "/"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 20
19: goto 24
20: StackMap locals:
StackMap stack:
aload 6
aload 9
invokevirtual java.util.jar.JarFile.getInputStream:(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
astore 7
21: aload 7
aload 4
aload 10
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.expand:(Ljava/io/InputStream;Ljava/io/File;Ljava/lang/String;)V
22: aload 7
invokevirtual java.io.InputStream.close:()V
23: aconst_null
astore 7
end local 11 end local 10 end local 9 24: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 11
end local 8 25: goto 41
StackMap locals: java.net.URL java.lang.String java.lang.String java.io.File java.io.File java.net.JarURLConnection java.util.jar.JarFile java.io.InputStream
StackMap stack: java.io.IOException
26: astore 8
start local 8 27: aload 4
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.deleteDir:(Ljava/io/File;)Z
pop
28: aload 8
athrow
end local 8 29: StackMap locals:
StackMap stack: java.lang.Throwable
astore 13
30: aload 7
ifnull 35
31: aload 7
invokevirtual java.io.InputStream.close:()V
32: goto 34
StackMap locals: java.net.URL java.lang.String java.lang.String java.io.File java.io.File java.net.JarURLConnection java.util.jar.JarFile java.io.InputStream top top top top top java.lang.Throwable
StackMap stack: java.lang.Throwable
33: pop
34: StackMap locals:
StackMap stack:
aconst_null
astore 7
35: StackMap locals:
StackMap stack:
aload 6
ifnull 40
36: aload 6
invokevirtual java.util.jar.JarFile.close:()V
37: goto 39
StackMap locals:
StackMap stack: java.lang.Throwable
38: pop
39: StackMap locals:
StackMap stack:
aconst_null
astore 6
40: StackMap locals:
StackMap stack:
aload 13
athrow
41: StackMap locals: java.net.URL java.lang.String java.lang.String java.io.File java.io.File java.net.JarURLConnection java.util.jar.JarFile java.io.InputStream
StackMap stack:
aload 7
ifnull 46
42: aload 7
invokevirtual java.io.InputStream.close:()V
43: goto 45
StackMap locals:
StackMap stack: java.lang.Throwable
44: pop
45: StackMap locals:
StackMap stack:
aconst_null
astore 7
46: StackMap locals:
StackMap stack:
aload 6
ifnull 51
47: aload 6
invokevirtual java.util.jar.JarFile.close:()V
48: goto 50
StackMap locals:
StackMap stack: java.lang.Throwable
49: pop
50: StackMap locals:
StackMap stack:
aconst_null
astore 6
51: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
areturn
end local 7 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 52 0 jar Ljava/net/URL;
0 52 1 pathname Ljava/lang/String;
0 52 2 dirname Ljava/lang/String;
1 52 3 appBase Ljava/io/File;
2 52 4 docBase Ljava/io/File;
5 52 5 juc Ljava/net/JarURLConnection;
7 52 6 jarFile Ljava/util/jar/JarFile;
8 52 7 input Ljava/io/InputStream;
10 25 8 jarEntries Ljava/util/Enumeration<Ljava/util/jar/JarEntry;>;
12 24 9 jarEntry Ljava/util/jar/JarEntry;
13 24 10 name Ljava/lang/String;
14 24 11 last I
16 18 12 parent Ljava/io/File;
27 29 8 e Ljava/io/IOException;
Exception table:
from to target type
8 25 26 Class java.io.IOException
8 29 29 any
31 32 33 Class java.lang.Throwable
36 37 38 Class java.lang.Throwable
42 43 44 Class java.lang.Throwable
47 48 49 Class java.lang.Throwable
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
jar
pathname
dirname
public static boolean copy(java.io.File, java.io.File);
descriptor: (Ljava/io/File;Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=10, args_size=2
start local 0 start local 1 0: iconst_1
istore 2
start local 2 1: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 5
2: aload 0
invokevirtual java.io.File.list:()[Ljava/lang/String;
astore 3
start local 3 3: aload 1
invokevirtual java.io.File.mkdir:()Z
istore 2
4: goto 7
end local 3 5: StackMap locals: int
StackMap stack:
iconst_1
anewarray java.lang.String
astore 3
start local 3 6: aload 3
iconst_0
ldc ""
aastore
7: StackMap locals: java.lang.String[]
StackMap stack:
aload 3
ifnonnull 9
8: iconst_0
anewarray java.lang.String
astore 3
9: StackMap locals:
StackMap stack:
iconst_0
istore 4
start local 4 10: goto 51
11: StackMap locals: int
StackMap stack:
new java.io.File
dup
aload 0
aload 3
iload 4
aaload
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 5
start local 5 12: new java.io.File
dup
aload 1
aload 3
iload 4
aaload
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 6
start local 6 13: aload 5
invokevirtual java.io.File.isDirectory:()Z
ifeq 16
14: aload 5
aload 6
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.copy:(Ljava/io/File;Ljava/io/File;)Z
istore 2
15: goto 50
16: StackMap locals: java.io.File java.io.File
StackMap stack:
aconst_null
astore 7
start local 7 17: aconst_null
astore 8
start local 8 18: new java.io.FileInputStream
dup
aload 5
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
invokevirtual java.io.FileInputStream.getChannel:()Ljava/nio/channels/FileChannel;
astore 7
19: new java.io.FileOutputStream
dup
aload 6
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
invokevirtual java.io.FileOutputStream.getChannel:()Ljava/nio/channels/FileChannel;
astore 8
20: aload 7
lconst_0
aload 7
invokevirtual java.nio.channels.FileChannel.size:()J
aload 8
invokevirtual java.nio.channels.FileChannel.transferTo:(JJLjava/nio/channels/WritableByteChannel;)J
pop2
21: goto 42
StackMap locals: java.io.File java.io.File int java.lang.String[] int java.io.File java.io.File java.nio.channels.FileChannel java.nio.channels.FileChannel
StackMap stack: java.io.IOException
22: pop
23: iconst_0
istore 2
24: aload 7
ifnull 28
25: aload 7
invokevirtual java.nio.channels.FileChannel.close:()V
26: goto 28
StackMap locals:
StackMap stack: java.io.IOException
27: pop
28: StackMap locals:
StackMap stack:
aload 8
ifnull 50
29: aload 8
invokevirtual java.nio.channels.FileChannel.close:()V
30: goto 50
StackMap locals:
StackMap stack: java.io.IOException
31: pop
goto 50
32: StackMap locals:
StackMap stack: java.lang.Throwable
astore 9
33: aload 7
ifnull 37
34: aload 7
invokevirtual java.nio.channels.FileChannel.close:()V
35: goto 37
StackMap locals: java.io.File java.io.File int java.lang.String[] int java.io.File java.io.File java.nio.channels.FileChannel java.nio.channels.FileChannel java.lang.Throwable
StackMap stack: java.io.IOException
36: pop
37: StackMap locals:
StackMap stack:
aload 8
ifnull 41
38: aload 8
invokevirtual java.nio.channels.FileChannel.close:()V
39: goto 41
StackMap locals:
StackMap stack: java.io.IOException
40: pop
41: StackMap locals:
StackMap stack:
aload 9
athrow
42: StackMap locals:
StackMap stack:
aload 7
ifnull 46
43: aload 7
invokevirtual java.nio.channels.FileChannel.close:()V
44: goto 46
StackMap locals:
StackMap stack: java.io.IOException
45: pop
46: StackMap locals:
StackMap stack:
aload 8
ifnull 50
47: aload 8
invokevirtual java.nio.channels.FileChannel.close:()V
48: goto 50
StackMap locals:
StackMap stack: java.io.IOException
49: pop
end local 8 end local 7 end local 6 end local 5 50: StackMap locals: java.io.File java.io.File int java.lang.String[] int
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
51: iload 4
aload 3
arraylength
if_icmpge 52
iload 2
ifne 11
end local 4 52: StackMap locals:
StackMap stack:
iload 2
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 53 0 src Ljava/io/File;
0 53 1 dest Ljava/io/File;
1 53 2 result Z
3 5 3 files [Ljava/lang/String;
6 53 3 files [Ljava/lang/String;
10 52 4 i I
12 50 5 fileSrc Ljava/io/File;
13 50 6 fileDest Ljava/io/File;
17 50 7 ic Ljava/nio/channels/FileChannel;
18 50 8 oc Ljava/nio/channels/FileChannel;
Exception table:
from to target type
18 21 22 Class java.io.IOException
25 26 27 Class java.io.IOException
29 30 31 Class java.io.IOException
18 24 32 any
34 35 36 Class java.io.IOException
38 39 40 Class java.io.IOException
43 44 45 Class java.io.IOException
47 48 49 Class java.io.IOException
MethodParameters:
Name Flags
src
dest
public static boolean delete(java.io.File);
descriptor: (Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 2
1: aload 0
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.deleteDir:(Ljava/io/File;)Z
ireturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.delete:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 dir Ljava/io/File;
MethodParameters:
Name Flags
dir
public static boolean deleteDir(java.io.File);
descriptor: (Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.list:()[Ljava/lang/String;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: iconst_0
anewarray java.lang.String
astore 1
3: StackMap locals: java.lang.String[]
StackMap stack:
iconst_0
istore 2
start local 2 4: goto 12
5: StackMap locals: int
StackMap stack:
new java.io.File
dup
aload 0
aload 1
iload 2
aaload
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 3
start local 3 6: aload 3
invokevirtual java.io.File.isDirectory:()Z
ifeq 9
7: aload 3
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.deleteDir:(Ljava/io/File;)Z
pop
8: goto 11
9: StackMap locals: java.io.File
StackMap stack:
aload 3
invokevirtual java.io.File.delete:()Z
ifne 11
10: new java.lang.IllegalStateException
dup
ldc "Unable to delete file: %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 3
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 3 11: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
12: iload 2
aload 1
arraylength
if_icmplt 5
end local 2 13: aload 0
invokevirtual java.io.File.delete:()Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 dir Ljava/io/File;
1 14 1 files [Ljava/lang/String;
4 13 2 i I
6 11 3 file Ljava/io/File;
MethodParameters:
Name Flags
dir
protected static void expand(java.io.InputStream, java.io.File, java.lang.String);
descriptor: (Ljava/io/InputStream;Ljava/io/File;Ljava/lang/String;)V
flags: (0x000c) ACC_PROTECTED, ACC_STATIC
Code:
stack=5, locals=8, args_size=3
start local 0 start local 1 start local 2 0: new java.io.File
dup
aload 1
aload 2
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 3
start local 3 1: aconst_null
astore 4
start local 4 2: new java.io.BufferedOutputStream
dup
new java.io.FileOutputStream
dup
aload 3
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
invokespecial java.io.BufferedOutputStream.<init>:(Ljava/io/OutputStream;)V
astore 4
3: sipush 2048
newarray 8
astore 5
start local 5 4: StackMap locals: java.io.File java.io.BufferedOutputStream byte[]
StackMap stack:
aload 0
aload 5
invokevirtual java.io.InputStream.read:([B)I
istore 6
start local 6 5: iload 6
ifgt 7
6: goto 15
7: StackMap locals: int
StackMap stack:
aload 4
aload 5
iconst_0
iload 6
invokevirtual java.io.BufferedOutputStream.write:([BII)V
end local 6 8: goto 4
end local 5 9: StackMap locals: java.io.InputStream java.io.File java.lang.String java.io.File java.io.BufferedOutputStream
StackMap stack: java.lang.Throwable
astore 7
10: aload 4
ifnull 14
11: aload 4
invokevirtual java.io.BufferedOutputStream.close:()V
12: goto 14
StackMap locals: java.io.InputStream java.io.File java.lang.String java.io.File java.io.BufferedOutputStream top top java.lang.Throwable
StackMap stack: java.io.IOException
13: pop
14: StackMap locals:
StackMap stack:
aload 7
athrow
15: StackMap locals: java.io.InputStream java.io.File java.lang.String java.io.File java.io.BufferedOutputStream
StackMap stack:
aload 4
ifnull 19
16: aload 4
invokevirtual java.io.BufferedOutputStream.close:()V
17: goto 19
StackMap locals:
StackMap stack: java.io.IOException
18: pop
19: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 input Ljava/io/InputStream;
0 20 1 docBase Ljava/io/File;
0 20 2 name Ljava/lang/String;
1 20 3 file Ljava/io/File;
2 20 4 output Ljava/io/BufferedOutputStream;
4 9 5 buffer [B
5 8 6 n I
Exception table:
from to target type
2 9 9 any
11 12 13 Class java.io.IOException
16 17 18 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
input
docBase
name
}
SourceFile: "ExpandJar.java"