public class org.apache.tomcat.util.net.WriteBuffer
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.apache.tomcat.util.net.WriteBuffer
  super_class: java.lang.Object
{
  private final int bufferSize;
    descriptor: I
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.util.concurrent.LinkedBlockingDeque<org.apache.tomcat.util.buf.ByteBufferHolder> buffers;
    descriptor: Ljava/util/concurrent/LinkedBlockingDeque;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/concurrent/LinkedBlockingDeque<Lorg/apache/tomcat/util/buf/ByteBufferHolder;>;

  public void <init>(int);
    descriptor: (I)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // int bufferSize
         0: .line 42
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 40
            aload 0 /* this */
            new java.util.concurrent.LinkedBlockingDeque
            dup
            invokespecial java.util.concurrent.LinkedBlockingDeque.<init>:()V
            putfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
         2: .line 43
            aload 0 /* this */
            iload 1 /* bufferSize */
            putfield org.apache.tomcat.util.net.WriteBuffer.bufferSize:I
         3: .line 44
            return
        end local 1 // int bufferSize
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0    4     0        this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0    4     1  bufferSize  I
    MethodParameters:
            Name  Flags
      bufferSize  

  void clear();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
         0: .line 47
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.clear:()V
         1: .line 48
            return
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Lorg/apache/tomcat/util/net/WriteBuffer;

  void add(byte[], int, int);
    descriptor: ([BII)V
    flags: (0x0000) 
    Code:
      stack=4, locals=5, args_size=4
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // byte[] buf
        start local 2 // int offset
        start local 3 // int length
         0: .line 51
            aload 0 /* this */
            iload 3 /* length */
            invokevirtual org.apache.tomcat.util.net.WriteBuffer.getByteBufferHolder:(I)Lorg/apache/tomcat/util/buf/ByteBufferHolder;
            astore 4 /* holder */
        start local 4 // org.apache.tomcat.util.buf.ByteBufferHolder holder
         1: .line 52
            aload 4 /* holder */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            aload 1 /* buf */
            iload 2 /* offset */
            iload 3 /* length */
            invokevirtual java.nio.ByteBuffer.put:([BII)Ljava/nio/ByteBuffer;
            pop
         2: .line 53
            return
        end local 4 // org.apache.tomcat.util.buf.ByteBufferHolder holder
        end local 3 // int length
        end local 2 // int offset
        end local 1 // byte[] buf
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    3     0    this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0    3     1     buf  [B
            0    3     2  offset  I
            0    3     3  length  I
            1    3     4  holder  Lorg/apache/tomcat/util/buf/ByteBufferHolder;
    MethodParameters:
        Name  Flags
      buf     
      offset  
      length  

  public void add(java.nio.ByteBuffer);
    descriptor: (Ljava/nio/ByteBuffer;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=2
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // java.nio.ByteBuffer from
         0: .line 57
            aload 0 /* this */
            aload 1 /* from */
            invokevirtual java.nio.ByteBuffer.remaining:()I
            invokevirtual org.apache.tomcat.util.net.WriteBuffer.getByteBufferHolder:(I)Lorg/apache/tomcat/util/buf/ByteBufferHolder;
            astore 2 /* holder */
        start local 2 // org.apache.tomcat.util.buf.ByteBufferHolder holder
         1: .line 58
            aload 2 /* holder */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            aload 1 /* from */
            invokevirtual java.nio.ByteBuffer.put:(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
            pop
         2: .line 59
            return
        end local 2 // org.apache.tomcat.util.buf.ByteBufferHolder holder
        end local 1 // java.nio.ByteBuffer from
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    3     0    this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0    3     1    from  Ljava/nio/ByteBuffer;
            1    3     2  holder  Lorg/apache/tomcat/util/buf/ByteBufferHolder;
    MethodParameters:
      Name  Flags
      from  

  private org.apache.tomcat.util.buf.ByteBufferHolder getByteBufferHolder(int);
    descriptor: (I)Lorg/apache/tomcat/util/buf/ByteBufferHolder;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=4, args_size=2
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // int capacity
         0: .line 63
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.peekLast:()Ljava/lang/Object;
            checkcast org.apache.tomcat.util.buf.ByteBufferHolder
            astore 2 /* holder */
        start local 2 // org.apache.tomcat.util.buf.ByteBufferHolder holder
         1: .line 64
            aload 2 /* holder */
            ifnull 2
            aload 2 /* holder */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.isFlipped:()Z
            ifne 2
            aload 2 /* holder */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.remaining:()I
            iload 1 /* capacity */
            if_icmpge 5
         2: .line 65
      StackMap locals: org.apache.tomcat.util.buf.ByteBufferHolder
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.bufferSize:I
            iload 1 /* capacity */
            invokestatic java.lang.Math.max:(II)I
            invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
            astore 3 /* buffer */
        start local 3 // java.nio.ByteBuffer buffer
         3: .line 66
            new org.apache.tomcat.util.buf.ByteBufferHolder
            dup
            aload 3 /* buffer */
            iconst_0
            invokespecial org.apache.tomcat.util.buf.ByteBufferHolder.<init>:(Ljava/nio/ByteBuffer;Z)V
            astore 2 /* holder */
         4: .line 67
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            aload 2 /* holder */
            invokevirtual java.util.concurrent.LinkedBlockingDeque.add:(Ljava/lang/Object;)Z
            pop
        end local 3 // java.nio.ByteBuffer buffer
         5: .line 69
      StackMap locals:
      StackMap stack:
            aload 2 /* holder */
            areturn
        end local 2 // org.apache.tomcat.util.buf.ByteBufferHolder holder
        end local 1 // int capacity
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0    6     0      this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0    6     1  capacity  I
            1    6     2    holder  Lorg/apache/tomcat/util/buf/ByteBufferHolder;
            3    5     3    buffer  Ljava/nio/ByteBuffer;
    MethodParameters:
          Name  Flags
      capacity  

  public boolean isEmpty();
    descriptor: ()Z
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
         0: .line 74
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.isEmpty:()Z
            ireturn
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/apache/tomcat/util/net/WriteBuffer;

  java.nio.ByteBuffer[] toArray(java.nio.ByteBuffer[]);
    descriptor: ([Ljava/nio/ByteBuffer;)[Ljava/nio/ByteBuffer;
    flags: (0x0080) ACC_VARARGS
    Code:
      stack=2, locals=7, args_size=2
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // java.nio.ByteBuffer[] prefixes
         0: .line 89
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 2 /* result */
        start local 2 // java.util.List result
         1: .line 90
            aload 1 /* prefixes */
            dup
            astore 6
            arraylength
            istore 5
            iconst_0
            istore 4
            goto 6
      StackMap locals: org.apache.tomcat.util.net.WriteBuffer java.nio.ByteBuffer[] java.util.List top int int java.nio.ByteBuffer[]
      StackMap stack:
         2: aload 6
            iload 4
            aaload
            astore 3 /* prefix */
        start local 3 // java.nio.ByteBuffer prefix
         3: .line 91
            aload 3 /* prefix */
            invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
            ifeq 5
         4: .line 92
            aload 2 /* result */
            aload 3 /* prefix */
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        end local 3 // java.nio.ByteBuffer prefix
         5: .line 90
      StackMap locals:
      StackMap stack:
            iinc 4 1
      StackMap locals:
      StackMap stack:
         6: iload 4
            iload 5
            if_icmplt 2
         7: .line 95
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.iterator:()Ljava/util/Iterator;
            astore 4
            goto 11
      StackMap locals: org.apache.tomcat.util.net.WriteBuffer java.nio.ByteBuffer[] java.util.List top java.util.Iterator
      StackMap stack:
         8: aload 4
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.apache.tomcat.util.buf.ByteBufferHolder
            astore 3 /* buffer */
        start local 3 // org.apache.tomcat.util.buf.ByteBufferHolder buffer
         9: .line 96
            aload 3 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.flip:()Z
            pop
        10: .line 97
            aload 2 /* result */
            aload 3 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        end local 3 // org.apache.tomcat.util.buf.ByteBufferHolder buffer
        11: .line 95
      StackMap locals:
      StackMap stack:
            aload 4
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 8
        12: .line 99
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.clear:()V
        13: .line 100
            aload 2 /* result */
            iconst_0
            anewarray java.nio.ByteBuffer
            invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
            checkcast java.nio.ByteBuffer[]
            areturn
        end local 2 // java.util.List result
        end local 1 // java.nio.ByteBuffer[] prefixes
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   14     0      this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0   14     1  prefixes  [Ljava/nio/ByteBuffer;
            1   14     2    result  Ljava/util/List<Ljava/nio/ByteBuffer;>;
            3    5     3    prefix  Ljava/nio/ByteBuffer;
            9   11     3    buffer  Lorg/apache/tomcat/util/buf/ByteBufferHolder;
    MethodParameters:
          Name  Flags
      prefixes  

  boolean write(org.apache.tomcat.util.net.SocketWrapperBase<?>, );
    descriptor: (Lorg/apache/tomcat/util/net/SocketWrapperBase;Z)Z
    flags: (0x0000) 
    Code:
      stack=2, locals=6, args_size=3
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // org.apache.tomcat.util.net.SocketWrapperBase socketWrapper
        start local 2 // boolean blocking
         0: .line 105
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.iterator:()Ljava/util/Iterator;
            astore 3 /* bufIter */
        start local 3 // java.util.Iterator bufIter
         1: .line 106
            iconst_0
            istore 4 /* dataLeft */
        start local 4 // boolean dataLeft
         2: .line 107
            goto 13
         3: .line 108
      StackMap locals: java.util.Iterator int
      StackMap stack:
            aload 3 /* bufIter */
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.apache.tomcat.util.buf.ByteBufferHolder
            astore 5 /* buffer */
        start local 5 // org.apache.tomcat.util.buf.ByteBufferHolder buffer
         4: .line 109
            aload 5 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.flip:()Z
            pop
         5: .line 110
            iload 2 /* blocking */
            ifeq 8
         6: .line 111
            aload 1 /* socketWrapper */
            aload 5 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            invokevirtual org.apache.tomcat.util.net.SocketWrapperBase.writeBlocking:(Ljava/nio/ByteBuffer;)V
         7: .line 112
            goto 9
         8: .line 113
      StackMap locals: org.apache.tomcat.util.buf.ByteBufferHolder
      StackMap stack:
            aload 1 /* socketWrapper */
            aload 5 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            invokevirtual org.apache.tomcat.util.net.SocketWrapperBase.writeNonBlockingInternal:(Ljava/nio/ByteBuffer;)V
         9: .line 115
      StackMap locals:
      StackMap stack:
            aload 5 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.remaining:()I
            ifne 12
        10: .line 116
            aload 3 /* bufIter */
            invokeinterface java.util.Iterator.remove:()V
        11: .line 117
            goto 13
        12: .line 118
      StackMap locals:
      StackMap stack:
            iconst_1
            istore 4 /* dataLeft */
        end local 5 // org.apache.tomcat.util.buf.ByteBufferHolder buffer
        13: .line 107
      StackMap locals:
      StackMap stack:
            iload 4 /* dataLeft */
            ifne 14
            aload 3 /* bufIter */
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 3
        14: .line 121
      StackMap locals:
      StackMap stack:
            iload 4 /* dataLeft */
            ireturn
        end local 4 // boolean dataLeft
        end local 3 // java.util.Iterator bufIter
        end local 2 // boolean blocking
        end local 1 // org.apache.tomcat.util.net.SocketWrapperBase socketWrapper
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0   15     0           this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0   15     1  socketWrapper  Lorg/apache/tomcat/util/net/SocketWrapperBase<*>;
            0   15     2       blocking  Z
            1   15     3        bufIter  Ljava/util/Iterator<Lorg/apache/tomcat/util/buf/ByteBufferHolder;>;
            2   15     4       dataLeft  Z
            4   13     5         buffer  Lorg/apache/tomcat/util/buf/ByteBufferHolder;
    Exceptions:
      throws java.io.IOException
    Signature: (Lorg/apache/tomcat/util/net/SocketWrapperBase<*>;Z)Z
    MethodParameters:
               Name  Flags
      socketWrapper  
      blocking       

  public boolean write(org.apache.tomcat.util.net.WriteBuffer$Sink, boolean);
    descriptor: (Lorg/apache/tomcat/util/net/WriteBuffer$Sink;Z)Z
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=6, args_size=3
        start local 0 // org.apache.tomcat.util.net.WriteBuffer this
        start local 1 // org.apache.tomcat.util.net.WriteBuffer$Sink sink
        start local 2 // boolean blocking
         0: .line 126
            aload 0 /* this */
            getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
            invokevirtual java.util.concurrent.LinkedBlockingDeque.iterator:()Ljava/util/Iterator;
            astore 3 /* bufIter */
        start local 3 // java.util.Iterator bufIter
         1: .line 127
            iconst_0
            istore 4 /* dataLeft */
        start local 4 // boolean dataLeft
         2: .line 128
            goto 8
         3: .line 129
      StackMap locals: java.util.Iterator int
      StackMap stack:
            aload 3 /* bufIter */
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.apache.tomcat.util.buf.ByteBufferHolder
            astore 5 /* buffer */
        start local 5 // org.apache.tomcat.util.buf.ByteBufferHolder buffer
         4: .line 130
            aload 5 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.flip:()Z
            pop
         5: .line 131
            aload 1 /* sink */
            aload 5 /* buffer */
            invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
            iload 2 /* blocking */
            invokeinterface org.apache.tomcat.util.net.WriteBuffer$Sink.writeFromBuffer:(Ljava/nio/ByteBuffer;Z)Z
            istore 4 /* dataLeft */
         6: .line 132
            iload 4 /* dataLeft */
            ifne 8
         7: .line 133
            aload 3 /* bufIter */
            invokeinterface java.util.Iterator.remove:()V
        end local 5 // org.apache.tomcat.util.buf.ByteBufferHolder buffer
         8: .line 128
      StackMap locals:
      StackMap stack:
            iload 4 /* dataLeft */
            ifne 9
            aload 3 /* bufIter */
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 3
         9: .line 136
      StackMap locals:
      StackMap stack:
            iload 4 /* dataLeft */
            ireturn
        end local 4 // boolean dataLeft
        end local 3 // java.util.Iterator bufIter
        end local 2 // boolean blocking
        end local 1 // org.apache.tomcat.util.net.WriteBuffer$Sink sink
        end local 0 // org.apache.tomcat.util.net.WriteBuffer this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   10     0      this  Lorg/apache/tomcat/util/net/WriteBuffer;
            0   10     1      sink  Lorg/apache/tomcat/util/net/WriteBuffer$Sink;
            0   10     2  blocking  Z
            1   10     3   bufIter  Ljava/util/Iterator<Lorg/apache/tomcat/util/buf/ByteBufferHolder;>;
            2   10     4  dataLeft  Z
            4    8     5    buffer  Lorg/apache/tomcat/util/buf/ByteBufferHolder;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
          Name  Flags
      sink      
      blocking  
}
SourceFile: "WriteBuffer.java"
NestMembers:
  org.apache.tomcat.util.net.WriteBuffer$Sink
InnerClasses:
  public abstract Sink = org.apache.tomcat.util.net.WriteBuffer$Sink of org.apache.tomcat.util.net.WriteBuffer