class org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler implements org.glassfish.grizzly.WriteHandler
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler
super_class: java.lang.Object
{
private volatile long size;
descriptor: J
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final org.glassfish.grizzly.http.server.Response response;
descriptor: Lorg/glassfish/grizzly/http/server/Response;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.glassfish.grizzly.http.io.NIOOutputStream outputStream;
descriptor: Lorg/glassfish/grizzly/http/io/NIOOutputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.channels.FileChannel fileChannel;
descriptor: Ljava/nio/channels/FileChannel;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.glassfish.grizzly.memory.MemoryManager mm;
descriptor: Lorg/glassfish/grizzly/memory/MemoryManager;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int chunkSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(org.glassfish.grizzly.http.server.Response, org.glassfish.grizzly.http.io.NIOOutputStream, java.io.File, int);
descriptor: (Lorg/glassfish/grizzly/http/server/Response;Lorg/glassfish/grizzly/http/io/NIOOutputStream;Ljava/io/File;I)V
flags: (0x0000)
Code:
stack=4, locals=6, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.io.FileInputStream
dup
aload 3
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
invokevirtual java.io.FileInputStream.getChannel:()Ljava/nio/channels/FileChannel;
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.fileChannel:Ljava/nio/channels/FileChannel;
2: goto 5
StackMap locals: org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler org.glassfish.grizzly.http.server.Response org.glassfish.grizzly.http.io.NIOOutputStream java.io.File int
StackMap stack: java.io.FileNotFoundException
3: astore 5
start local 5 4: new java.lang.IllegalStateException
dup
ldc "File should have existed"
aload 5
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 5: StackMap locals:
StackMap stack:
aload 0
aload 3
invokevirtual java.io.File.length:()J
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
6: aload 0
aload 1
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
7: aload 0
aload 2
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
8: aload 0
aload 1
invokevirtual org.glassfish.grizzly.http.server.Response.getRequest:()Lorg/glassfish/grizzly/http/server/Request;
invokevirtual org.glassfish.grizzly.http.server.Request.getContext:()Lorg/glassfish/grizzly/filterchain/FilterChainContext;
invokevirtual org.glassfish.grizzly.filterchain.FilterChainContext.getMemoryManager:()Lorg/glassfish/grizzly/memory/MemoryManager;
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.mm:Lorg/glassfish/grizzly/memory/MemoryManager;
9: aload 0
iload 4
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.chunkSize:I
10: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandlerBase$NonBlockingDownloadHandler;
0 11 1 response Lorg/glassfish/grizzly/http/server/Response;
0 11 2 outputStream Lorg/glassfish/grizzly/http/io/NIOOutputStream;
0 11 3 file Ljava/io/File;
0 11 4 chunkSize I
4 5 5 e Ljava/io/FileNotFoundException;
Exception table:
from to target type
1 2 3 Class java.io.FileNotFoundException
MethodParameters:
Name Flags
response final
outputStream final
file final
chunkSize final
public void onWritePossible();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: getstatic org.glassfish.grizzly.http.server.StaticHttpHandlerBase.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "[onWritePossible]"
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;)V
1: aload 0
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.sendChunk:()Z
istore 1
start local 1 2: iload 1
ifeq 4
3: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
aload 0
invokevirtual org.glassfish.grizzly.http.io.NIOOutputStream.notifyCanWrite:(Lorg/glassfish/grizzly/WriteHandler;)V
4: StackMap locals: int
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandlerBase$NonBlockingDownloadHandler;
2 5 1 isWriteMore Z
Exceptions:
throws java.lang.Exception
public void onError(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.glassfish.grizzly.http.server.StaticHttpHandlerBase.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "[onError] "
aload 1
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
1: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
sipush 500
aload 1
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(ILjava/lang/String;)V
2: aload 0
iconst_1
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.complete:(Z)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandlerBase$NonBlockingDownloadHandler;
0 4 1 t Ljava/lang/Throwable;
MethodParameters:
Name Flags
t
private boolean sendChunk();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.mm:Lorg/glassfish/grizzly/memory/MemoryManager;
aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.chunkSize:I
invokeinterface org.glassfish.grizzly.memory.MemoryManager.allocate:(I)Lorg/glassfish/grizzly/Buffer;
astore 1
start local 1 1: aload 1
iconst_1
invokeinterface org.glassfish.grizzly.Buffer.allowBufferDispose:(Z)V
2: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.fileChannel:Ljava/nio/channels/FileChannel;
aload 1
invokestatic org.glassfish.grizzly.memory.Buffers.readFromFileChannel:(Ljava/nio/channels/FileChannel;Lorg/glassfish/grizzly/Buffer;)J
l2i
istore 2
start local 2 3: iload 2
ifgt 6
4: aload 0
iconst_0
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.complete:(Z)V
5: iconst_0
ireturn
6: StackMap locals: org.glassfish.grizzly.Buffer int
StackMap stack:
aload 1
invokeinterface org.glassfish.grizzly.Buffer.trim:()V
7: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
aload 1
invokevirtual org.glassfish.grizzly.http.io.NIOOutputStream.write:(Lorg/glassfish/grizzly/Buffer;)V
8: aload 0
dup
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
iload 2
i2l
lsub
putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
9: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
lconst_0
lcmp
ifgt 12
10: aload 0
iconst_0
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.complete:(Z)V
11: iconst_0
ireturn
12: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandlerBase$NonBlockingDownloadHandler;
1 13 1 buffer Lorg/glassfish/grizzly/Buffer;
3 13 2 justReadBytes I
Exceptions:
throws java.io.IOException
private void complete(boolean);
descriptor: (Z)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.fileChannel:Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.close:()V
1: goto 5
StackMap locals:
StackMap stack: java.io.IOException
2: astore 2
start local 2 3: iload 1
ifne 5
4: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
sipush 500
aload 2
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(ILjava/lang/String;)V
end local 2 5: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
invokevirtual org.glassfish.grizzly.http.io.NIOOutputStream.close:()V
6: goto 10
StackMap locals:
StackMap stack: java.io.IOException
7: astore 2
start local 2 8: iload 1
ifne 10
9: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
sipush 500
aload 2
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(ILjava/lang/String;)V
end local 2 10: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
invokevirtual org.glassfish.grizzly.http.server.Response.isSuspended:()Z
ifeq 13
11: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
invokevirtual org.glassfish.grizzly.http.server.Response.resume:()V
12: goto 14
13: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
invokevirtual org.glassfish.grizzly.http.server.Response.finish:()V
14: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandlerBase$NonBlockingDownloadHandler;
0 15 1 isError Z
3 5 2 e Ljava/io/IOException;
8 10 2 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
5 6 7 Class java.io.IOException
MethodParameters:
Name Flags
isError final
}
SourceFile: "StaticHttpHandlerBase.java"
NestHost: org.glassfish.grizzly.http.server.StaticHttpHandlerBase
InnerClasses:
private NonBlockingDownloadHandler = org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler of org.glassfish.grizzly.http.server.StaticHttpHandlerBase