public class javax.imageio.stream.FileCacheImageOutputStream extends javax.imageio.stream.ImageOutputStreamImpl
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: javax.imageio.stream.FileCacheImageOutputStream
super_class: javax.imageio.stream.ImageOutputStreamImpl
{
private java.io.OutputStream stream;
descriptor: Ljava/io/OutputStream;
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 long maxStreamPos;
descriptor: J
flags: (0x0002) ACC_PRIVATE
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.OutputStream, java.io.File);
descriptor: (Ljava/io/OutputStream;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.ImageOutputStreamImpl.<init>:()V
1: aload 0
lconst_0
putfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
2: aload 1
ifnonnull 4
3: new java.lang.IllegalArgumentException
dup
ldc "stream == null!"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: javax.imageio.stream.FileCacheImageOutputStream java.io.OutputStream java.io.File
StackMap stack:
aload 2
ifnull 6
aload 2
invokevirtual java.io.File.isDirectory:()Z
ifne 6
5: new java.lang.IllegalArgumentException
dup
ldc "Not a directory!"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield javax.imageio.stream.FileCacheImageOutputStream.stream:Ljava/io/OutputStream;
7: aload 2
ifnonnull 9
8: 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.FileCacheImageOutputStream.cacheFile:Ljava/io/File;
goto 12
9: 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;
10: invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
11: putfield javax.imageio.stream.FileCacheImageOutputStream.cacheFile:Ljava/io/File;
12: StackMap locals:
StackMap stack:
aload 0
new java.io.RandomAccessFile
dup
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cacheFile:Ljava/io/File;
ldc "rw"
invokespecial java.io.RandomAccessFile.<init>:(Ljava/io/File;Ljava/lang/String;)V
putfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
13: 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.FileCacheImageOutputStream.closeAction:Lcom/sun/imageio/stream/StreamCloser$CloseAction;
14: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.closeAction:Lcom/sun/imageio/stream/StreamCloser$CloseAction;
invokestatic com.sun.imageio.stream.StreamCloser.addToQueue:(Lcom/sun/imageio/stream/StreamCloser$CloseAction;)V
15: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
0 16 1 stream Ljava/io/OutputStream;
0 16 2 cacheDir Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
stream
cacheDir
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.checkClosed:()V
1: aload 0
iconst_0
putfield javax.imageio.stream.FileCacheImageOutputStream.bitOffset:I
2: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.read:()I
istore 1
start local 1 3: iload 1
iconst_m1
if_icmpeq 5
4: aload 0
dup
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
lconst_1
ladd
putfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
5: StackMap locals: int
StackMap stack:
iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
3 6 1 val I
Exceptions:
throws java.io.IOException
public int read(byte[], int, int);
descriptor: ([BII)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.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.FileCacheImageOutputStream.bitOffset:I
8: iload 3
ifne 10
9: iconst_0
ireturn
10: StackMap locals:
StackMap stack:
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
aload 1
iload 2
iload 3
invokevirtual java.io.RandomAccessFile.read:([BII)I
istore 4
start local 4 11: iload 4
iconst_m1
if_icmpeq 13
12: aload 0
dup
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
iload 4
i2l
ladd
putfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
13: StackMap locals: int
StackMap stack:
iload 4
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
0 14 1 b [B
0 14 2 off I
0 14 3 len I
11 14 4 nbytes I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
public void write(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.flushBits:()V
1: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
iload 1
invokevirtual java.io.RandomAccessFile.write:(I)V
2: aload 0
dup
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
lconst_1
ladd
putfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
3: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
invokestatic java.lang.Math.max:(JJ)J
putfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
0 5 1 b I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
public void write(byte[], int, int);
descriptor: ([BII)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.flushBits:()V
1: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
aload 1
iload 2
iload 3
invokevirtual java.io.RandomAccessFile.write:([BII)V
2: aload 0
dup
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
iload 3
i2l
ladd
putfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
3: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
invokestatic java.lang.Math.max:(JJ)J
putfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
0 5 1 b [B
0 5 2 off I
0 5 3 len I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
public long length();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.checkClosed:()V
1: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.length:()J
2: lreturn
3: StackMap locals:
StackMap stack: java.io.IOException
pop
4: ldc -1
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
Exception table:
from to target type
0 2 3 Class java.io.IOException
public void seek(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.checkClosed:()V
1: lload 1
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.flushedPos:J
lcmp
ifge 3
2: new java.lang.IndexOutOfBoundsException
dup
invokespecial java.lang.IndexOutOfBoundsException.<init>:()V
athrow
3: StackMap locals:
StackMap stack:
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
lload 1
invokevirtual java.io.RandomAccessFile.seek:(J)V
4: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.getFilePointer:()J
putfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
5: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.streamPos:J
invokestatic java.lang.Math.max:(JJ)J
putfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
6: aload 0
iconst_0
putfield javax.imageio.stream.FileCacheImageOutputStream.bitOffset:I
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
0 8 1 pos J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pos
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/FileCacheImageOutputStream;
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/FileCacheImageOutputStream;
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/FileCacheImageOutputStream;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.length:()J
putfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
1: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.seek:(J)V
2: aload 0
aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.maxStreamPos:J
invokevirtual javax.imageio.stream.FileCacheImageOutputStream.flushBefore:(J)V
3: aload 0
invokespecial javax.imageio.stream.ImageOutputStreamImpl.close:()V
4: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.close:()V
5: aload 0
aconst_null
putfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
6: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cacheFile:Ljava/io/File;
invokevirtual java.io.File.delete:()Z
pop
7: aload 0
aconst_null
putfield javax.imageio.stream.FileCacheImageOutputStream.cacheFile:Ljava/io/File;
8: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.stream:Ljava/io/OutputStream;
invokevirtual java.io.OutputStream.flush:()V
9: aload 0
aconst_null
putfield javax.imageio.stream.FileCacheImageOutputStream.stream:Ljava/io/OutputStream;
10: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.closeAction:Lcom/sun/imageio/stream/StreamCloser$CloseAction;
invokestatic com.sun.imageio.stream.StreamCloser.removeFromQueue:(Lcom/sun/imageio/stream/StreamCloser$CloseAction;)V
11: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
Exceptions:
throws java.io.IOException
public void flushBefore(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=10, args_size=2
start local 0 start local 1 0: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.flushedPos:J
lstore 3
start local 3 1: aload 0
lload 1
invokespecial javax.imageio.stream.ImageOutputStreamImpl.flushBefore:(J)V
2: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.flushedPos:J
lload 3
lsub
lstore 5
start local 5 3: lload 5
lconst_0
lcmp
ifle 14
4: sipush 512
istore 7
start local 7 5: iload 7
newarray 8
astore 8
start local 8 6: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
lload 3
invokevirtual java.io.RandomAccessFile.seek:(J)V
7: goto 12
8: StackMap locals: javax.imageio.stream.FileCacheImageOutputStream long long long int byte[]
StackMap stack:
lload 5
iload 7
i2l
invokestatic java.lang.Math.min:(JJ)J
l2i
istore 9
start local 9 9: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.cache:Ljava/io/RandomAccessFile;
aload 8
iconst_0
iload 9
invokevirtual java.io.RandomAccessFile.readFully:([BII)V
10: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.stream:Ljava/io/OutputStream;
aload 8
iconst_0
iload 9
invokevirtual java.io.OutputStream.write:([BII)V
11: lload 5
iload 9
i2l
lsub
lstore 5
end local 9 12: StackMap locals:
StackMap stack:
lload 5
lconst_0
lcmp
ifgt 8
13: aload 0
getfield javax.imageio.stream.FileCacheImageOutputStream.stream:Ljava/io/OutputStream;
invokevirtual java.io.OutputStream.flush:()V
end local 8 end local 7 14: StackMap locals:
StackMap stack:
return
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Ljavax/imageio/stream/FileCacheImageOutputStream;
0 15 1 pos J
1 15 3 oFlushedPos J
3 15 5 flushBytes J
5 14 7 bufLen I
6 14 8 buf [B
9 12 9 len I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pos
}
SourceFile: "FileCacheImageOutputStream.java"
InnerClasses:
public final CloseAction = com.sun.imageio.stream.StreamCloser$CloseAction of com.sun.imageio.stream.StreamCloser