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 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
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: aload 0
iload 1
putfield org.apache.tomcat.util.net.WriteBuffer.bufferSize:I
3: return
end local 1 end local 0 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 0: aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
invokevirtual java.util.concurrent.LinkedBlockingDeque.clear:()V
1: return
end local 0 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 start local 1 start local 2 start local 3 0: aload 0
iload 3
invokevirtual org.apache.tomcat.util.net.WriteBuffer.getByteBufferHolder:(I)Lorg/apache/tomcat/util/buf/ByteBufferHolder;
astore 4
start local 4 1: aload 4
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
aload 1
iload 2
iload 3
invokevirtual java.nio.ByteBuffer.put:([BII)Ljava/nio/ByteBuffer;
pop
2: return
end local 4 end local 3 end local 2 end local 1 end local 0 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 start local 1 0: aload 0
aload 1
invokevirtual java.nio.ByteBuffer.remaining:()I
invokevirtual org.apache.tomcat.util.net.WriteBuffer.getByteBufferHolder:(I)Lorg/apache/tomcat/util/buf/ByteBufferHolder;
astore 2
start local 2 1: aload 2
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
aload 1
invokevirtual java.nio.ByteBuffer.put:(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
pop
2: return
end local 2 end local 1 end local 0 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 start local 1 0: aload 0
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
start local 2 1: aload 2
ifnull 2
aload 2
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.isFlipped:()Z
ifne 2
aload 2
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.remaining:()I
iload 1
if_icmpge 5
2: StackMap locals: org.apache.tomcat.util.buf.ByteBufferHolder
StackMap stack:
aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.bufferSize:I
iload 1
invokestatic java.lang.Math.max:(II)I
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
astore 3
start local 3 3: new org.apache.tomcat.util.buf.ByteBufferHolder
dup
aload 3
iconst_0
invokespecial org.apache.tomcat.util.buf.ByteBufferHolder.<init>:(Ljava/nio/ByteBuffer;Z)V
astore 2
4: aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
aload 2
invokevirtual java.util.concurrent.LinkedBlockingDeque.add:(Ljava/lang/Object;)Z
pop
end local 3 5: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 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 0: aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
invokevirtual java.util.concurrent.LinkedBlockingDeque.isEmpty:()Z
ireturn
end local 0 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 start local 1 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 1: aload 1
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
start local 3 3: aload 3
invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
ifeq 5
4: aload 2
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 5: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
6: iload 4
iload 5
if_icmplt 2
7: aload 0
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
start local 3 9: aload 3
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.flip:()Z
pop
10: aload 2
aload 3
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 11: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 8
12: aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
invokevirtual java.util.concurrent.LinkedBlockingDeque.clear:()V
13: aload 2
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 end local 1 end local 0 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 start local 1 start local 2 0: aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
invokevirtual java.util.concurrent.LinkedBlockingDeque.iterator:()Ljava/util/Iterator;
astore 3
start local 3 1: iconst_0
istore 4
start local 4 2: goto 13
3: StackMap locals: java.util.Iterator int
StackMap stack:
aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.tomcat.util.buf.ByteBufferHolder
astore 5
start local 5 4: aload 5
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.flip:()Z
pop
5: iload 2
ifeq 8
6: aload 1
aload 5
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
invokevirtual org.apache.tomcat.util.net.SocketWrapperBase.writeBlocking:(Ljava/nio/ByteBuffer;)V
7: goto 9
8: StackMap locals: org.apache.tomcat.util.buf.ByteBufferHolder
StackMap stack:
aload 1
aload 5
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
invokevirtual org.apache.tomcat.util.net.SocketWrapperBase.writeNonBlockingInternal:(Ljava/nio/ByteBuffer;)V
9: StackMap locals:
StackMap stack:
aload 5
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.remaining:()I
ifne 12
10: aload 3
invokeinterface java.util.Iterator.remove:()V
11: goto 13
12: StackMap locals:
StackMap stack:
iconst_1
istore 4
end local 5 13: StackMap locals:
StackMap stack:
iload 4
ifne 14
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
14: StackMap locals:
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 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 start local 1 start local 2 0: aload 0
getfield org.apache.tomcat.util.net.WriteBuffer.buffers:Ljava/util/concurrent/LinkedBlockingDeque;
invokevirtual java.util.concurrent.LinkedBlockingDeque.iterator:()Ljava/util/Iterator;
astore 3
start local 3 1: iconst_0
istore 4
start local 4 2: goto 8
3: StackMap locals: java.util.Iterator int
StackMap stack:
aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.tomcat.util.buf.ByteBufferHolder
astore 5
start local 5 4: aload 5
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.flip:()Z
pop
5: aload 1
aload 5
invokevirtual org.apache.tomcat.util.buf.ByteBufferHolder.getBuf:()Ljava/nio/ByteBuffer;
iload 2
invokeinterface org.apache.tomcat.util.net.WriteBuffer$Sink.writeFromBuffer:(Ljava/nio/ByteBuffer;Z)Z
istore 4
6: iload 4
ifne 8
7: aload 3
invokeinterface java.util.Iterator.remove:()V
end local 5 8: StackMap locals:
StackMap stack:
iload 4
ifne 9
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
9: StackMap locals:
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 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