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 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
        start local 1 // org.glassfish.grizzly.http.server.Response response
        start local 2 // org.glassfish.grizzly.http.io.NIOOutputStream outputStream
        start local 3 // java.io.File file
        start local 4 // int chunkSize
         0: .line 265
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 268
            aload 0 /* this */
            new java.io.FileInputStream
            dup
            aload 3 /* file */
            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: .line 269
            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 /* e */
        start local 5 // java.io.FileNotFoundException e
         4: .line 270
            new java.lang.IllegalStateException
            dup
            ldc "File should have existed"
            aload 5 /* e */
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
            athrow
        end local 5 // java.io.FileNotFoundException e
         5: .line 273
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 3 /* file */
            invokevirtual java.io.File.length:()J
            putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
         6: .line 275
            aload 0 /* this */
            aload 1 /* response */
            putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
         7: .line 276
            aload 0 /* this */
            aload 2 /* outputStream */
            putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
         8: .line 277
            aload 0 /* this */
            aload 1 /* response */
            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: .line 278
            aload 0 /* this */
            iload 4 /* chunkSize */
            putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.chunkSize:I
        10: .line 279
            return
        end local 4 // int chunkSize
        end local 3 // java.io.File file
        end local 2 // org.glassfish.grizzly.http.io.NIOOutputStream outputStream
        end local 1 // org.glassfish.grizzly.http.server.Response response
        end local 0 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
      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 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
         0: .line 283
            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: .line 285
            aload 0 /* this */
            invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.sendChunk:()Z
            istore 1 /* isWriteMore */
        start local 1 // boolean isWriteMore
         2: .line 287
            iload 1 /* isWriteMore */
            ifeq 4
         3: .line 289
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
            aload 0 /* this */
            invokevirtual org.glassfish.grizzly.http.io.NIOOutputStream.notifyCanWrite:(Lorg/glassfish/grizzly/WriteHandler;)V
         4: .line 291
      StackMap locals: int
      StackMap stack:
            return
        end local 1 // boolean isWriteMore
        end local 0 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
      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 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
        start local 1 // java.lang.Throwable t
         0: .line 295
            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 /* t */
            invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
         1: .line 296
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
            sipush 500
            aload 1 /* t */
            invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
            invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(ILjava/lang/String;)V
         2: .line 297
            aload 0 /* this */
            iconst_1
            invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.complete:(Z)V
         3: .line 298
            return
        end local 1 // java.lang.Throwable t
        end local 0 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
      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 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
         0: .line 305
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.mm:Lorg/glassfish/grizzly/memory/MemoryManager;
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.chunkSize:I
            invokeinterface org.glassfish.grizzly.memory.MemoryManager.allocate:(I)Lorg/glassfish/grizzly/Buffer;
            astore 1 /* buffer */
        start local 1 // org.glassfish.grizzly.Buffer buffer
         1: .line 307
            aload 1 /* buffer */
            iconst_1
            invokeinterface org.glassfish.grizzly.Buffer.allowBufferDispose:(Z)V
         2: .line 310
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.fileChannel:Ljava/nio/channels/FileChannel;
            aload 1 /* buffer */
            invokestatic org.glassfish.grizzly.memory.Buffers.readFromFileChannel:(Ljava/nio/channels/FileChannel;Lorg/glassfish/grizzly/Buffer;)J
            l2i
            istore 2 /* justReadBytes */
        start local 2 // int justReadBytes
         3: .line 312
            iload 2 /* justReadBytes */
            ifgt 6
         4: .line 313
            aload 0 /* this */
            iconst_0
            invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.complete:(Z)V
         5: .line 314
            iconst_0
            ireturn
         6: .line 318
      StackMap locals: org.glassfish.grizzly.Buffer int
      StackMap stack:
            aload 1 /* buffer */
            invokeinterface org.glassfish.grizzly.Buffer.trim:()V
         7: .line 321
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.outputStream:Lorg/glassfish/grizzly/http/io/NIOOutputStream;
            aload 1 /* buffer */
            invokevirtual org.glassfish.grizzly.http.io.NIOOutputStream.write:(Lorg/glassfish/grizzly/Buffer;)V
         8: .line 322
            aload 0 /* this */
            dup
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
            iload 2 /* justReadBytes */
            i2l
            lsub
            putfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
         9: .line 325
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.size:J
            lconst_0
            lcmp
            ifgt 12
        10: .line 326
            aload 0 /* this */
            iconst_0
            invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.complete:(Z)V
        11: .line 327
            iconst_0
            ireturn
        12: .line 330
      StackMap locals:
      StackMap stack:
            iconst_1
            ireturn
        end local 2 // int justReadBytes
        end local 1 // org.glassfish.grizzly.Buffer buffer
        end local 0 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
      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 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
        start local 1 // boolean isError
         0: .line 338
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.fileChannel:Ljava/nio/channels/FileChannel;
            invokevirtual java.nio.channels.FileChannel.close:()V
         1: .line 339
            goto 5
      StackMap locals:
      StackMap stack: java.io.IOException
         2: astore 2 /* e */
        start local 2 // java.io.IOException e
         3: .line 340
            iload 1 /* isError */
            ifne 5
         4: .line 341
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
            sipush 500
            aload 2 /* e */
            invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
            invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(ILjava/lang/String;)V
        end local 2 // java.io.IOException e
         5: .line 346
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            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: .line 347
            goto 10
      StackMap locals:
      StackMap stack: java.io.IOException
         7: astore 2 /* e */
        start local 2 // java.io.IOException e
         8: .line 348
            iload 1 /* isError */
            ifne 10
         9: .line 349
            aload 0 /* this */
            getfield org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler.response:Lorg/glassfish/grizzly/http/server/Response;
            sipush 500
            aload 2 /* e */
            invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
            invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(ILjava/lang/String;)V
        end local 2 // java.io.IOException e
        10: .line 353
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            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: .line 354
            aload 0 /* this */
            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: .line 355
            goto 14
        13: .line 356
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            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: .line 358
      StackMap locals:
      StackMap stack:
            return
        end local 1 // boolean isError
        end local 0 // org.glassfish.grizzly.http.server.StaticHttpHandlerBase$NonBlockingDownloadHandler this
      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