class io.vertx.core.file.impl.FileCache
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: io.vertx.core.file.impl.FileCache
super_class: java.lang.Object
{
private java.lang.Thread shutdownHook;
descriptor: Ljava/lang/Thread;
flags: (0x0002) ACC_PRIVATE
private java.io.File cacheDir;
descriptor: Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
static io.vertx.core.file.impl.FileCache setupCache(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/vertx/core/file/impl/FileCache;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: new io.vertx.core.file.impl.FileCache
dup
aload 0
invokestatic io.vertx.core.file.impl.FileCache.setupCacheDir:(Ljava/lang/String;)Ljava/io/File;
invokespecial io.vertx.core.file.impl.FileCache.<init>:(Ljava/io/File;)V
astore 1
start local 1 1: aload 1
invokevirtual io.vertx.core.file.impl.FileCache.registerShutdownHook:()V
2: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 fileCacheDir Ljava/lang/String;
1 3 1 cache Lio/vertx/core/file/impl/FileCache;
MethodParameters:
Name Flags
fileCacheDir
static java.io.File setupCacheDir(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/io/File;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 2
1: aload 0
iconst_0
aload 0
invokevirtual java.lang.String.length:()I
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 0
2: StackMap locals:
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;
invokestatic java.util.UUID.randomUUID:()Ljava/util/UUID;
invokevirtual java.util.UUID.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 1
start local 1 3: new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 2
start local 2 4: invokestatic io.vertx.core.impl.Utils.isWindows:()Z
ifeq 7
5: aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
6: goto 12
7: StackMap locals: java.lang.String java.io.File
StackMap stack:
ldc "rwx------"
invokestatic java.nio.file.attribute.PosixFilePermissions.fromString:(Ljava/lang/String;)Ljava/util/Set;
astore 3
start local 3 8: aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_1
anewarray java.nio.file.attribute.FileAttribute
dup
iconst_0
aload 3
invokestatic java.nio.file.attribute.PosixFilePermissions.asFileAttribute:(Ljava/util/Set;)Ljava/nio/file/attribute/FileAttribute;
aastore
invokestatic java.nio.file.Files.createDirectories:(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
pop
end local 3 9: goto 12
StackMap locals:
StackMap stack: java.io.IOException
10: astore 3
start local 3 11: new java.lang.IllegalStateException
dup
new java.lang.StringBuilder
dup
ldc "Failed to create cache dir: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 3
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 12: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 fileCacheDir Ljava/lang/String;
3 13 1 cacheDirName Ljava/lang/String;
4 13 2 cacheDir Ljava/io/File;
8 9 3 perms Ljava/util/Set<Ljava/nio/file/attribute/PosixFilePermission;>;
11 12 3 e Ljava/io/IOException;
Exception table:
from to target type
4 9 10 Class java.io.IOException
MethodParameters:
Name Flags
fileCacheDir
public void <init>(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0001) ACC_PUBLIC
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
aload 1
putfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/vertx/core/file/impl/FileCache;
0 3 1 cacheDir Ljava/io/File;
MethodParameters:
Name Flags
cacheDir
synchronized void registerShutdownHook();
descriptor: ()V
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=3, locals=2, args_size=1
start local 0 0: new java.lang.Thread
dup
aload 0
invokedynamic run(Lio/vertx/core/file/impl/FileCache;)Ljava/lang/Runnable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
io/vertx/core/file/impl/FileCache.runHook()V (7)
()V
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
astore 1
start local 1 1: aload 0
aload 1
putfield io.vertx.core.file.impl.FileCache.shutdownHook:Ljava/lang/Thread;
2: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 1
invokevirtual java.lang.Runtime.addShutdownHook:(Ljava/lang/Thread;)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/vertx/core/file/impl/FileCache;
1 4 1 shutdownHook Ljava/lang/Thread;
private void runHook();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
ifnonnull 4
2: aload 1
monitorexit
3: return
4: StackMap locals: io.vertx.core.file.impl.FileCache
StackMap stack:
aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
new java.lang.Thread
dup
aload 0
invokedynamic run(Lio/vertx/core/file/impl/FileCache;)Ljava/lang/Runnable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
io/vertx/core/file/impl/FileCache.lambda$1()V (7)
()V
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
astore 1
start local 1 9: aload 1
invokevirtual java.lang.Thread.start:()V
10: aload 1
ldc 10000
invokevirtual java.lang.Thread.join:(J)V
11: goto 14
StackMap locals: io.vertx.core.file.impl.FileCache java.lang.Thread
StackMap stack: java.lang.InterruptedException
12: pop
13: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.interrupt:()V
14: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lio/vertx/core/file/impl/FileCache;
9 15 1 deleteCacheDirThread Ljava/lang/Thread;
Exception table:
from to target type
1 3 6 any
4 5 6 any
6 7 6 any
10 11 12 Class java.lang.InterruptedException
void close();
descriptor: ()V
flags: (0x0000)
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
dup
astore 2
monitorenter
1: aload 0
getfield io.vertx.core.file.impl.FileCache.shutdownHook:Ljava/lang/Thread;
astore 1
start local 1 2: aload 0
aconst_null
putfield io.vertx.core.file.impl.FileCache.shutdownHook:Ljava/lang/Thread;
3: aload 2
monitorexit
4: goto 7
end local 1 StackMap locals: io.vertx.core.file.impl.FileCache top io.vertx.core.file.impl.FileCache
StackMap stack: java.lang.Throwable
5: aload 2
monitorexit
6: athrow
start local 1 7: StackMap locals: io.vertx.core.file.impl.FileCache java.lang.Thread
StackMap stack:
aload 1
ifnull 11
8: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 1
invokevirtual java.lang.Runtime.removeShutdownHook:(Ljava/lang/Thread;)Z
pop
9: goto 11
StackMap locals:
StackMap stack: java.lang.IllegalStateException
10: pop
11: StackMap locals:
StackMap stack:
aload 0
invokevirtual io.vertx.core.file.impl.FileCache.deleteCacheDir:()V
12: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lio/vertx/core/file/impl/FileCache;
2 5 1 hook Ljava/lang/Thread;
7 13 1 hook Ljava/lang/Thread;
Exception table:
from to target type
1 4 5 any
5 6 5 any
8 9 10 Class java.lang.IllegalStateException
Exceptions:
throws java.io.IOException
private void deleteCacheDir();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
dup
astore 2
monitorenter
1: aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
ifnonnull 4
2: aload 2
monitorexit
3: return
4: StackMap locals: io.vertx.core.file.impl.FileCache top io.vertx.core.file.impl.FileCache
StackMap stack:
aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
astore 1
start local 1 5: aload 0
aconst_null
putfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
6: aload 2
monitorexit
7: goto 10
end local 1 StackMap locals:
StackMap stack: java.lang.Throwable
8: aload 2
monitorexit
9: athrow
start local 1 10: StackMap locals: io.vertx.core.file.impl.FileCache java.io.File
StackMap stack:
aload 1
invokevirtual java.io.File.exists:()Z
ifeq 12
11: aload 1
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_1
invokestatic io.vertx.core.file.impl.FileSystemImpl.delete:(Ljava/nio/file/Path;Z)V
12: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lio/vertx/core/file/impl/FileCache;
5 8 1 dir Ljava/io/File;
10 13 1 dir Ljava/io/File;
Exception table:
from to target type
1 3 8 any
4 7 8 any
8 9 8 any
Exceptions:
throws java.io.IOException
java.io.File getFile(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/io/File;
flags: (0x0000)
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
ifnonnull 2
1: new java.lang.IllegalStateException
dup
ldc "cacheDir is null"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/vertx/core/file/impl/FileCache;
0 3 1 fileName Ljava/lang/String;
MethodParameters:
Name Flags
fileName
java.io.File cache(java.lang.String, java.io.File, boolean);
descriptor: (Ljava/lang/String;Ljava/io/File;Z)Ljava/io/File;
flags: (0x0000)
Code:
stack=6, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: new java.io.File
dup
aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 4
start local 4 1: aload 2
invokevirtual java.io.File.isDirectory:()Z
istore 5
start local 5 2: iload 5
ifne 11
3: aload 4
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.mkdirs:()Z
pop
4: iload 3
ifne 9
5: aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
aload 4
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.CopyOption
invokestatic java.nio.file.Files.copy:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;
pop
6: goto 12
StackMap locals: io.vertx.core.file.impl.FileCache java.lang.String java.io.File int java.io.File int
StackMap stack: java.nio.file.FileAlreadyExistsException
7: pop
8: goto 12
9: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
aload 4
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_1
anewarray java.nio.file.CopyOption
dup
iconst_0
getstatic java.nio.file.StandardCopyOption.REPLACE_EXISTING:Ljava/nio/file/StandardCopyOption;
aastore
invokestatic java.nio.file.Files.copy:(Ljava/nio/file/Path;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)Ljava/nio/file/Path;
pop
10: goto 12
11: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.io.File.mkdirs:()Z
pop
12: StackMap locals:
StackMap stack:
aload 4
areturn
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 13 0 this Lio/vertx/core/file/impl/FileCache;
0 13 1 fileName Ljava/lang/String;
0 13 2 resource Ljava/io/File;
0 13 3 overwrite Z
1 13 4 cacheFile Ljava/io/File;
2 13 5 isDirectory Z
Exception table:
from to target type
5 6 7 Class java.nio.file.FileAlreadyExistsException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fileName
resource
overwrite
void cacheFile(java.lang.String, java.io.InputStream, boolean);
descriptor: (Ljava/lang/String;Ljava/io/InputStream;Z)V
flags: (0x0000)
Code:
stack=6, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: new java.io.File
dup
aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 4
start local 4 1: aload 4
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.mkdirs:()Z
pop
2: iload 3
ifne 7
3: aload 2
aload 4
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.CopyOption
invokestatic java.nio.file.Files.copy:(Ljava/io/InputStream;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)J
pop2
4: goto 8
StackMap locals: io.vertx.core.file.impl.FileCache java.lang.String java.io.InputStream int java.io.File
StackMap stack: java.nio.file.FileAlreadyExistsException
5: pop
6: goto 8
7: StackMap locals:
StackMap stack:
aload 2
aload 4
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_1
anewarray java.nio.file.CopyOption
dup
iconst_0
getstatic java.nio.file.StandardCopyOption.REPLACE_EXISTING:Ljava/nio/file/StandardCopyOption;
aastore
invokestatic java.nio.file.Files.copy:(Ljava/io/InputStream;Ljava/nio/file/Path;[Ljava/nio/file/CopyOption;)J
pop2
8: 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 9 0 this Lio/vertx/core/file/impl/FileCache;
0 9 1 fileName Ljava/lang/String;
0 9 2 is Ljava/io/InputStream;
0 9 3 overwrite Z
1 9 4 cacheFile Ljava/io/File;
Exception table:
from to target type
3 4 5 Class java.nio.file.FileAlreadyExistsException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fileName
is
overwrite
void cacheDir(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: new java.io.File
dup
aload 0
getfield io.vertx.core.file.impl.FileCache.cacheDir:Ljava/io/File;
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 2
start local 2 1: aload 2
invokevirtual java.io.File.mkdirs:()Z
pop
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/vertx/core/file/impl/FileCache;
0 3 1 fileName Ljava/lang/String;
1 3 2 file Ljava/io/File;
MethodParameters:
Name Flags
fileName
private void lambda$1();
descriptor: ()V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual io.vertx.core.file.impl.FileCache.deleteCacheDir:()V
1: goto 3
StackMap locals:
StackMap stack: java.io.IOException
2: pop
3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/vertx/core/file/impl/FileCache;
Exception table:
from to target type
0 1 2 Class java.io.IOException
}
SourceFile: "FileCache.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles