public class javax.imageio.stream.FileCacheImageInputStream extends javax.imageio.stream.ImageInputStreamImpl
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: javax.imageio.stream.FileCacheImageInputStream
super_class: javax.imageio.stream.ImageInputStreamImpl
{
private java.io.InputStream stream;
descriptor: Ljava/io/InputStream;
flags: (0x0002) ACC_PRIVATE
private java.io.File cacheFile;
descriptor: Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
private java.io.RandomAccessFile cache;
descriptor: Ljava/io/RandomAccessFile;
flags: (0x0002) ACC_PRIVATE
private static final int BUFFER_LENGTH;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1024
private byte[] buf;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private long length;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private boolean foundEOF;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private final java.lang.Object disposerReferent;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final sun.java2d.DisposerRecord disposerRecord;
descriptor: Lsun/java2d/DisposerRecord;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.sun.imageio.stream.StreamCloser$CloseAction closeAction;
descriptor: Lcom/sun/imageio/stream/StreamCloser$CloseAction;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>(java.io.InputStream, java.io.File);
descriptor: (Ljava/io/InputStream;Ljava/io/File;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial javax.imageio.stream.ImageInputStreamImpl.<init>:()V
1: aload 0
sipush 1024
newarray 8
putfield javax.imageio.stream.FileCacheImageInputStream.buf:[B
2: aload 0
lconst_0
putfield javax.imageio.stream.FileCacheImageInputStream.length:J
3: aload 0
iconst_0
putfield javax.imageio.stream.FileCacheImageInputStream.foundEOF:Z
4: aload 1
ifnonnull 6
5: new java.lang.IllegalArgumentException
dup
ldc "stream == null!"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: javax.imageio.stream.FileCacheImageInputStream java.io.InputStream java.io.File
StackMap stack:
aload 2
ifnull 8
aload 2
invokevirtual java.io.File.isDirectory:()Z
ifne 8
7: new java.lang.IllegalArgumentException
dup
ldc "Not a directory!"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield javax.imageio.stream.FileCacheImageInputStream.stream:Ljava/io/InputStream;
9: aload 2
ifnonnull 11
10: aload 0
ldc "imageio"
ldc ".tmp"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempFile:(Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
putfield javax.imageio.stream.FileCacheImageInputStream.cacheFile:Ljava/io/File;
goto 14
11: StackMap locals:
StackMap stack:
aload 0
aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
ldc "imageio"
ldc ".tmp"
iconst_0
anewarray java.nio.file.attribute.FileAttribute
invokestatic java.nio.file.Files.createTempFile:(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;
12: invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
13: putfield javax.imageio.stream.FileCacheImageInputStream.cacheFile:Ljava/io/File;
14: StackMap locals:
StackMap stack:
aload 0
new java.io.RandomAccessFile
dup
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cacheFile:Ljava/io/File;
ldc "rw"
invokespecial java.io.RandomAccessFile.<init>:(Ljava/io/File;Ljava/lang/String;)V
putfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
15: aload 0
aload 0
invokestatic com.sun.imageio.stream.StreamCloser.createCloseAction:(Ljavax/imageio/stream/ImageInputStream;)Lcom/sun/imageio/stream/StreamCloser$CloseAction;
putfield javax.imageio.stream.FileCacheImageInputStream.closeAction:Lcom/sun/imageio/stream/StreamCloser$CloseAction;
16: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.closeAction:Lcom/sun/imageio/stream/StreamCloser$CloseAction;
invokestatic com.sun.imageio.stream.StreamCloser.addToQueue:(Lcom/sun/imageio/stream/StreamCloser$CloseAction;)V
17: aload 0
new javax.imageio.stream.FileCacheImageInputStream$StreamDisposerRecord
dup
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cacheFile:Ljava/io/File;
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
invokespecial javax.imageio.stream.FileCacheImageInputStream$StreamDisposerRecord.<init>:(Ljava/io/File;Ljava/io/RandomAccessFile;)V
putfield javax.imageio.stream.FileCacheImageInputStream.disposerRecord:Lsun/java2d/DisposerRecord;
18: aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc Ljavax/imageio/stream/FileCacheImageInputStream;
if_acmpne 22
19: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield javax.imageio.stream.FileCacheImageInputStream.disposerReferent:Ljava/lang/Object;
20: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.disposerReferent:Ljava/lang/Object;
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.disposerRecord:Lsun/java2d/DisposerRecord;
invokestatic sun.java2d.Disposer.addRecord:(Ljava/lang/Object;Lsun/java2d/DisposerRecord;)V
21: goto 23
22: StackMap locals:
StackMap stack:
aload 0
new com.sun.imageio.stream.StreamFinalizer
dup
aload 0
invokespecial com.sun.imageio.stream.StreamFinalizer.<init>:(Ljavax/imageio/stream/ImageInputStream;)V
putfield javax.imageio.stream.FileCacheImageInputStream.disposerReferent:Ljava/lang/Object;
23: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
0 24 1 stream Ljava/io/InputStream;
0 24 2 cacheDir Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
stream
cacheDir
private long readUntil(long);
descriptor: (J)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=6, args_size=2
start local 0 start local 1 0: lload 1
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.length:J
lcmp
ifge 2
1: lload 1
lreturn
2: StackMap locals:
StackMap stack:
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.foundEOF:Z
ifeq 4
3: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.length:J
lreturn
4: StackMap locals:
StackMap stack:
lload 1
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.length:J
lsub
lstore 3
start local 3 5: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.length:J
invokevirtual java.io.RandomAccessFile.seek:(J)V
6: goto 15
7: StackMap locals: long
StackMap stack:
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.stream:Ljava/io/InputStream;
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.buf:[B
iconst_0
lload 3
ldc 1024
invokestatic java.lang.Math.min:(JJ)J
l2i
invokevirtual java.io.InputStream.read:([BII)I
8: istore 5
start local 5 9: iload 5
iconst_m1
if_icmpne 12
10: aload 0
iconst_1
putfield javax.imageio.stream.FileCacheImageInputStream.foundEOF:Z
11: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.length:J
lreturn
12: StackMap locals: int
StackMap stack:
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.buf:[B
iconst_0
iload 5
invokevirtual java.io.RandomAccessFile.write:([BII)V
13: lload 3
iload 5
i2l
lsub
lstore 3
14: aload 0
dup
getfield javax.imageio.stream.FileCacheImageInputStream.length:J
iload 5
i2l
ladd
putfield javax.imageio.stream.FileCacheImageInputStream.length:J
end local 5 15: StackMap locals:
StackMap stack:
lload 3
lconst_0
lcmp
ifgt 7
16: lload 1
lreturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
0 17 1 pos J
5 17 3 len J
9 15 5 nbytes I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pos
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=5, args_size=1
start local 0 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageInputStream.checkClosed:()V
1: aload 0
iconst_0
putfield javax.imageio.stream.FileCacheImageInputStream.bitOffset:I
2: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
lconst_1
ladd
lstore 1
start local 1 3: aload 0
lload 1
invokevirtual javax.imageio.stream.FileCacheImageInputStream.readUntil:(J)J
lstore 3
start local 3 4: lload 3
lload 1
lcmp
iflt 7
5: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
aload 0
dup
getfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
dup2_x1
lconst_1
ladd
putfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
invokevirtual java.io.RandomAccessFile.seek:(J)V
6: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.read:()I
ireturn
7: StackMap locals: long long
StackMap stack:
iconst_m1
ireturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
3 8 1 next J
4 8 3 pos J
Exceptions:
throws java.io.IOException
public int read(byte[], int, int);
descriptor: ([BII)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageInputStream.checkClosed:()V
1: aload 1
ifnonnull 3
2: new java.lang.NullPointerException
dup
ldc "b == null!"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
iload 2
iflt 4
iload 3
iflt 4
iload 2
iload 3
iadd
aload 1
arraylength
if_icmpgt 4
iload 2
iload 3
iadd
ifge 7
4: StackMap locals:
StackMap stack:
new java.lang.IndexOutOfBoundsException
dup
5: ldc "off < 0 || len < 0 || off+len > b.length || off+len < 0!"
6: invokespecial java.lang.IndexOutOfBoundsException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield javax.imageio.stream.FileCacheImageInputStream.bitOffset:I
8: iload 3
ifne 10
9: iconst_0
ireturn
10: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
iload 3
i2l
ladd
invokevirtual javax.imageio.stream.FileCacheImageInputStream.readUntil:(J)J
lstore 4
start local 4 11: iload 3
i2l
lload 4
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
lsub
invokestatic java.lang.Math.min:(JJ)J
l2i
istore 3
12: iload 3
ifle 17
13: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
invokevirtual java.io.RandomAccessFile.seek:(J)V
14: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
aload 1
iload 2
iload 3
invokevirtual java.io.RandomAccessFile.readFully:([BII)V
15: aload 0
dup
getfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
iload 3
i2l
ladd
putfield javax.imageio.stream.FileCacheImageInputStream.streamPos:J
16: iload 3
ireturn
17: StackMap locals: long
StackMap stack:
iconst_m1
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
0 18 1 b [B
0 18 2 off I
0 18 3 len I
11 18 4 pos J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
public boolean isCached();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
public boolean isCachedFile();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
public boolean isCachedMemory();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial javax.imageio.stream.ImageInputStreamImpl.close:()V
1: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.disposerRecord:Lsun/java2d/DisposerRecord;
invokeinterface sun.java2d.DisposerRecord.dispose:()V
2: aload 0
aconst_null
putfield javax.imageio.stream.FileCacheImageInputStream.stream:Ljava/io/InputStream;
3: aload 0
aconst_null
putfield javax.imageio.stream.FileCacheImageInputStream.cache:Ljava/io/RandomAccessFile;
4: aload 0
aconst_null
putfield javax.imageio.stream.FileCacheImageInputStream.cacheFile:Ljava/io/File;
5: aload 0
getfield javax.imageio.stream.FileCacheImageInputStream.closeAction:Lcom/sun/imageio/stream/StreamCloser$CloseAction;
invokestatic com.sun.imageio.stream.StreamCloser.removeFromQueue:(Lcom/sun/imageio/stream/StreamCloser$CloseAction;)V
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
Exceptions:
throws java.io.IOException
protected void finalize();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljavax/imageio/stream/FileCacheImageInputStream;
Exceptions:
throws java.lang.Throwable
RuntimeVisibleAnnotations:
java.lang.Deprecated(since = "9")
}
SourceFile: "FileCacheImageInputStream.java"
NestMembers:
javax.imageio.stream.FileCacheImageInputStream$StreamDisposerRecord
InnerClasses:
public final CloseAction = com.sun.imageio.stream.StreamCloser$CloseAction of com.sun.imageio.stream.StreamCloser
private StreamDisposerRecord = javax.imageio.stream.FileCacheImageInputStream$StreamDisposerRecord of javax.imageio.stream.FileCacheImageInputStream