public class org.glassfish.grizzly.nio.transport.TCPNIOUtils
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.nio.transport.TCPNIOUtils
super_class: java.lang.Object
{
static final java.util.logging.Logger LOGGER;
descriptor: Ljava/util/logging/Logger;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/nio/transport/TCPNIOUtils;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.$assertionsDisabled:Z
3: getstatic org.glassfish.grizzly.nio.transport.TCPNIOTransport.LOGGER:Ljava/util/logging/Logger;
putstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/transport/TCPNIOUtils;
public static int writeCompositeBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.memory.CompositeBuffer);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/memory/CompositeBuffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=11, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.remaining:()I
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.calcWriteBufferSize:(Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;I)I
istore 2
start local 2 1: aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.position:()I
istore 3
start local 3 2: aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.limit:()I
istore 4
start local 4 3: aload 1
iload 3
iload 2
iadd
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.limit:(I)Lorg/glassfish/grizzly/Buffer;
pop
4: aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getChannel:()Ljava/nio/channels/SelectableChannel;
checkcast java.nio.channels.SocketChannel
astore 5
start local 5 5: iconst_0
istore 6
start local 6 6: aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.toBufferArray:()Lorg/glassfish/grizzly/memory/BufferArray;
astore 7
start local 7 7: invokestatic org.glassfish.grizzly.nio.DirectByteBufferRecord.get:()Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
astore 8
start local 8 8: aload 7
iload 2
aload 8
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.fill:(Lorg/glassfish/grizzly/memory/BufferArray;ILorg/glassfish/grizzly/nio/DirectByteBufferRecord;)V
9: aload 8
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.finishBufferSlice:()V
10: aload 8
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.getArraySize:()I
istore 9
start local 9 11: iload 9
iconst_1
if_icmpeq 12
aload 5
aload 8
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.getArray:()[Ljava/nio/ByteBuffer;
iconst_0
iload 9
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffers:(Ljava/nio/channels/SocketChannel;[Ljava/nio/ByteBuffer;II)I
goto 13
12: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.CompositeBuffer int int int java.nio.channels.SocketChannel int org.glassfish.grizzly.memory.BufferArray org.glassfish.grizzly.nio.DirectByteBufferRecord int
StackMap stack:
aload 5
aload 8
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.getArray:()[Ljava/nio/ByteBuffer;
iconst_0
aaload
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer:(Ljava/nio/channels/SocketChannel;Ljava/nio/ByteBuffer;)I
13: StackMap locals:
StackMap stack: int
istore 6
14: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 22
15: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "TCPNIOConnection ({0}) (composite) write {1} bytes"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
dup
iconst_1
iload 6
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
end local 9 16: goto 22
StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.CompositeBuffer int int int java.nio.channels.SocketChannel int org.glassfish.grizzly.memory.BufferArray org.glassfish.grizzly.nio.DirectByteBufferRecord
StackMap stack: java.lang.Throwable
17: astore 10
18: aload 8
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.release:()V
19: aload 7
invokevirtual org.glassfish.grizzly.memory.BufferArray.restore:()V
20: aload 7
invokevirtual org.glassfish.grizzly.memory.BufferArray.recycle:()V
21: aload 10
athrow
22: StackMap locals:
StackMap stack:
aload 8
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.release:()V
23: aload 7
invokevirtual org.glassfish.grizzly.memory.BufferArray.restore:()V
24: aload 7
invokevirtual org.glassfish.grizzly.memory.BufferArray.recycle:()V
25: aload 1
iload 3
iload 6
iadd
iload 4
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
26: iload 6
ireturn
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 27 1 buffer Lorg/glassfish/grizzly/memory/CompositeBuffer;
1 27 2 bufferSize I
2 27 3 oldPos I
3 27 4 oldLim I
5 27 5 socketChannel Ljava/nio/channels/SocketChannel;
6 27 6 written I
7 27 7 bufferArray Lorg/glassfish/grizzly/memory/BufferArray;
8 27 8 ioRecord Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
11 16 9 arraySize I
Exception table:
from to target type
8 17 17 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
connection final
buffer final
public static int writeSimpleBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.Buffer);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/Buffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=10, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getChannel:()Ljava/nio/channels/SelectableChannel;
checkcast java.nio.channels.SocketChannel
astore 2
start local 2 1: aload 1
invokeinterface org.glassfish.grizzly.Buffer.position:()I
istore 3
start local 3 2: aload 1
invokeinterface org.glassfish.grizzly.Buffer.limit:()I
istore 4
start local 4 3: aload 1
invokeinterface org.glassfish.grizzly.Buffer.isDirect:()Z
ifeq 13
4: aload 1
invokeinterface org.glassfish.grizzly.Buffer.toByteBuffer:()Ljava/nio/ByteBuffer;
astore 6
start local 6 5: aload 6
invokevirtual java.nio.ByteBuffer.position:()I
istore 7
start local 7 6: aload 2
aload 6
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer:(Ljava/nio/channels/SocketChannel;Ljava/nio/ByteBuffer;)I
istore 5
start local 5 7: goto 11
end local 5 StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.Buffer java.nio.channels.SocketChannel int int top java.nio.ByteBuffer int
StackMap stack: java.lang.Throwable
8: astore 8
9: aload 6
iload 7
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
pop
10: aload 8
athrow
start local 5 11: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.Buffer java.nio.channels.SocketChannel int int int java.nio.ByteBuffer int
StackMap stack:
aload 6
iload 7
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
pop
end local 7 end local 6 12: goto 24
end local 5 13: StackMap locals:
StackMap stack:
aload 0
aload 1
invokeinterface org.glassfish.grizzly.Buffer.remaining:()I
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.calcWriteBufferSize:(Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;I)I
istore 6
start local 6 14: aload 1
iload 3
iload 6
iadd
invokeinterface org.glassfish.grizzly.Buffer.limit:(I)Lorg/glassfish/grizzly/Buffer;
pop
15: invokestatic org.glassfish.grizzly.nio.DirectByteBufferRecord.get:()Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
astore 7
start local 7 16: aload 7
iload 6
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.allocate:(I)Ljava/nio/ByteBuffer;
astore 8
start local 8 17: aload 1
iload 6
aload 8
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.fill:(Lorg/glassfish/grizzly/Buffer;ILjava/nio/ByteBuffer;)V
18: aload 2
aload 8
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.flushByteBuffer:(Ljava/nio/channels/SocketChannel;Ljava/nio/ByteBuffer;)I
istore 5
start local 5 19: goto 23
end local 5 StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.Buffer java.nio.channels.SocketChannel int int top int org.glassfish.grizzly.nio.DirectByteBufferRecord java.nio.ByteBuffer
StackMap stack: java.lang.Throwable
20: astore 9
21: aload 7
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.release:()V
22: aload 9
athrow
start local 5 23: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.Buffer java.nio.channels.SocketChannel int int int int org.glassfish.grizzly.nio.DirectByteBufferRecord java.nio.ByteBuffer
StackMap stack:
aload 7
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.release:()V
end local 8 end local 7 end local 6 24: StackMap locals:
StackMap stack:
aload 1
iload 3
iload 5
iadd
iload 4
invokestatic org.glassfish.grizzly.memory.Buffers.setPositionLimit:(Lorg/glassfish/grizzly/Buffer;II)V
25: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 27
26: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "TCPNIOConnection ({0}) (plain) write {1} bytes"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
dup
iconst_1
iload 5
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
27: StackMap locals:
StackMap stack:
iload 5
ireturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 28 1 buffer Lorg/glassfish/grizzly/Buffer;
1 28 2 socketChannel Ljava/nio/channels/SocketChannel;
2 28 3 oldPos I
3 28 4 oldLim I
7 8 5 written I
11 13 5 written I
19 20 5 written I
23 28 5 written I
5 12 6 directByteBuffer Ljava/nio/ByteBuffer;
6 12 7 pos I
14 24 6 bufferSize I
16 24 7 ioRecord Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
17 24 8 directByteBuffer Ljava/nio/ByteBuffer;
Exception table:
from to target type
6 8 8 any
18 20 20 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
connection final
buffer final
public static int flushByteBuffer(java.nio.channels.SocketChannel, java.nio.ByteBuffer);
descriptor: (Ljava/nio/channels/SocketChannel;Ljava/nio/ByteBuffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.nio.channels.SocketChannel.write:(Ljava/nio/ByteBuffer;)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 channel Ljava/nio/channels/SocketChannel;
0 1 1 byteBuffer Ljava/nio/ByteBuffer;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel final
byteBuffer final
public static int flushByteBuffers(java.nio.channels.SocketChannel, java.nio.ByteBuffer[], int, int);
descriptor: (Ljava/nio/channels/SocketChannel;[Ljava/nio/ByteBuffer;II)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
iload 2
iload 3
invokevirtual java.nio.channels.SocketChannel.write:([Ljava/nio/ByteBuffer;II)J
l2i
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 channel Ljava/nio/channels/SocketChannel;
0 1 1 byteBuffer [Ljava/nio/ByteBuffer;
0 1 2 firstBufferOffest I
0 1 3 numberOfBuffers I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
channel final
byteBuffer final
firstBufferOffest final
numberOfBuffers final
private static void fill(org.glassfish.grizzly.Buffer, int, java.nio.ByteBuffer);
descriptor: (Lorg/glassfish/grizzly/Buffer;ILjava/nio/ByteBuffer;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 2
iload 1
invokevirtual java.nio.ByteBuffer.limit:(I)Ljava/nio/Buffer;
pop
1: aload 0
invokeinterface org.glassfish.grizzly.Buffer.position:()I
istore 3
start local 3 2: aload 0
aload 2
invokeinterface org.glassfish.grizzly.Buffer.get:(Ljava/nio/ByteBuffer;)Lorg/glassfish/grizzly/Buffer;
pop
3: aload 2
iconst_0
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
pop
4: aload 0
iload 3
invokeinterface org.glassfish.grizzly.Buffer.position:(I)Lorg/glassfish/grizzly/Buffer;
pop
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 src Lorg/glassfish/grizzly/Buffer;
0 6 1 size I
0 6 2 dstByteBuffer Ljava/nio/ByteBuffer;
2 6 3 oldPos I
MethodParameters:
Name Flags
src
size
dstByteBuffer
static void fill(org.glassfish.grizzly.memory.BufferArray, int, org.glassfish.grizzly.nio.DirectByteBufferRecord);
descriptor: (Lorg/glassfish/grizzly/memory/BufferArray;ILorg/glassfish/grizzly/nio/DirectByteBufferRecord;)V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=11, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.glassfish.grizzly.memory.BufferArray.getArray:()[Ljava/lang/Object;
checkcast org.glassfish.grizzly.Buffer[]
astore 3
start local 3 1: aload 0
invokevirtual org.glassfish.grizzly.memory.BufferArray.size:()I
istore 4
start local 4 2: iload 1
istore 5
start local 5 3: iconst_0
istore 6
start local 6 4: goto 26
5: StackMap locals: org.glassfish.grizzly.memory.BufferArray int org.glassfish.grizzly.nio.DirectByteBufferRecord org.glassfish.grizzly.Buffer[] int int int
StackMap stack:
aload 3
iload 6
aaload
astore 7
start local 7 6: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.$assertionsDisabled:Z
ifne 7
aload 7
invokeinterface org.glassfish.grizzly.Buffer.isComposite:()Z
ifeq 7
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
7: StackMap locals: org.glassfish.grizzly.Buffer
StackMap stack:
aload 7
invokeinterface org.glassfish.grizzly.Buffer.remaining:()I
istore 8
start local 8 8: iload 8
ifne 10
9: goto 25
10: StackMap locals: int
StackMap stack:
aload 7
invokeinterface org.glassfish.grizzly.Buffer.isDirect:()Z
ifeq 14
11: aload 2
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.finishBufferSlice:()V
12: aload 2
aload 7
invokeinterface org.glassfish.grizzly.Buffer.toByteBuffer:()Ljava/nio/ByteBuffer;
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.putToArray:(Ljava/nio/ByteBuffer;)V
13: goto 24
14: StackMap locals:
StackMap stack:
aload 2
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.getDirectBufferSlice:()Ljava/nio/ByteBuffer;
astore 9
start local 9 15: aload 9
ifnonnull 20
16: aload 2
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.getDirectBuffer:()Ljava/nio/ByteBuffer;
astore 10
start local 10 17: aload 10
ifnonnull 19
18: aload 2
iload 5
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.allocate:(I)Ljava/nio/ByteBuffer;
pop
19: StackMap locals: java.nio.ByteBuffer java.nio.ByteBuffer
StackMap stack:
aload 2
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.sliceBuffer:()Ljava/nio/ByteBuffer;
astore 9
end local 10 20: StackMap locals:
StackMap stack:
aload 9
invokevirtual java.nio.ByteBuffer.limit:()I
istore 10
start local 10 21: aload 9
aload 9
invokevirtual java.nio.ByteBuffer.position:()I
iload 8
iadd
invokevirtual java.nio.ByteBuffer.limit:(I)Ljava/nio/Buffer;
pop
22: aload 7
aload 9
invokeinterface org.glassfish.grizzly.Buffer.get:(Ljava/nio/ByteBuffer;)Lorg/glassfish/grizzly/Buffer;
pop
23: aload 9
iload 10
invokevirtual java.nio.ByteBuffer.limit:(I)Ljava/nio/Buffer;
pop
end local 10 end local 9 24: StackMap locals:
StackMap stack:
iload 5
iload 8
isub
istore 5
end local 8 end local 7 25: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
26: iload 6
iload 4
if_icmplt 5
end local 6 27: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 bufferArray Lorg/glassfish/grizzly/memory/BufferArray;
0 28 1 totalBufferSize I
0 28 2 ioRecord Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
1 28 3 buffers [Lorg/glassfish/grizzly/Buffer;
2 28 4 size I
3 28 5 totalRemaining I
4 27 6 i I
6 25 7 buffer Lorg/glassfish/grizzly/Buffer;
8 25 8 bufferSize I
15 24 9 currentDirectBufferSlice Ljava/nio/ByteBuffer;
17 20 10 directByteBuffer Ljava/nio/ByteBuffer;
21 24 10 oldLim I
MethodParameters:
Name Flags
bufferArray final
totalBufferSize final
ioRecord final
private static int calcWriteBufferSize(org.glassfish.grizzly.nio.transport.TCPNIOConnection, int);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;I)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.glassfish.grizzly.nio.transport.TCPNIOTransport.MAX_SEND_BUFFER_SIZE:I
iload 1
aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getWriteBufferSize:()I
iconst_3
imul
iconst_2
idiv
invokestatic java.lang.Math.min:(II)I
invokestatic java.lang.Math.min:(II)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 1 1 bufferSize I
MethodParameters:
Name Flags
connection final
bufferSize final
public static org.glassfish.grizzly.Buffer allocateAndReadBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;)Lorg/glassfish/grizzly/Buffer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=9, args_size=1
start local 0 0: aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getMemoryManager:()Lorg/glassfish/grizzly/memory/MemoryManager;
astore 1
start local 1 1: aconst_null
astore 3
start local 3 2: aconst_null
astore 4
start local 4 3: getstatic org.glassfish.grizzly.nio.transport.TCPNIOTransport.MAX_RECEIVE_BUFFER_SIZE:I
aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getReadBufferSize:()I
invokestatic java.lang.Math.min:(II)I
istore 5
start local 5 4: aload 1
iload 5
invokeinterface org.glassfish.grizzly.memory.MemoryManager.willAllocateDirect:(I)Z
ifne 18
5: invokestatic org.glassfish.grizzly.nio.DirectByteBufferRecord.get:()Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
astore 6
start local 6 6: aload 6
iload 5
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.allocate:(I)Ljava/nio/ByteBuffer;
astore 7
start local 7 7: aload 0
aload 7
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.readSimpleByteBuffer:(Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Ljava/nio/ByteBuffer;)I
istore 2
start local 2 8: iload 2
ifle 16
9: aload 7
invokevirtual java.nio.ByteBuffer.flip:()Ljava/nio/Buffer;
pop
10: aload 1
iload 2
invokeinterface org.glassfish.grizzly.memory.MemoryManager.allocate:(I)Lorg/glassfish/grizzly/Buffer;
astore 4
11: aload 4
aload 7
invokeinterface org.glassfish.grizzly.Buffer.put:(Ljava/nio/ByteBuffer;)Lorg/glassfish/grizzly/Buffer;
pop
12: goto 16
end local 2 StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.MemoryManager top java.lang.Throwable org.glassfish.grizzly.Buffer int org.glassfish.grizzly.nio.DirectByteBufferRecord java.nio.ByteBuffer
StackMap stack: java.lang.Throwable
13: astore 8
14: aload 6
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.release:()V
15: aload 8
athrow
start local 2 16: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.MemoryManager int java.lang.Throwable org.glassfish.grizzly.Buffer int org.glassfish.grizzly.nio.DirectByteBufferRecord java.nio.ByteBuffer
StackMap stack:
aload 6
invokevirtual org.glassfish.grizzly.nio.DirectByteBufferRecord.release:()V
end local 7 end local 6 17: goto 24
end local 2 18: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.MemoryManager top java.lang.Throwable org.glassfish.grizzly.Buffer int
StackMap stack:
aload 1
iload 5
invokeinterface org.glassfish.grizzly.memory.MemoryManager.allocateAtLeast:(I)Lorg/glassfish/grizzly/Buffer;
astore 4
19: aload 0
aload 4
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.readBuffer:(Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/Buffer;)I
istore 2
end local 5 start local 2 20: goto 24
end local 2 StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.MemoryManager top java.lang.Throwable org.glassfish.grizzly.Buffer
StackMap stack: java.lang.Throwable
21: astore 5
start local 5 22: aload 5
astore 3
23: iconst_m1
istore 2
end local 5 start local 2 24: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.MemoryManager int java.lang.Throwable org.glassfish.grizzly.Buffer
StackMap stack:
iload 2
ifle 28
25: aload 4
iload 2
invokeinterface org.glassfish.grizzly.Buffer.position:(I)Lorg/glassfish/grizzly/Buffer;
pop
26: aload 4
iconst_1
invokeinterface org.glassfish.grizzly.Buffer.allowBufferDispose:(Z)V
27: goto 35
28: StackMap locals:
StackMap stack:
aload 4
ifnull 30
29: aload 4
invokeinterface org.glassfish.grizzly.Buffer.dispose:()V
30: StackMap locals:
StackMap stack:
iload 2
ifge 34
31: aload 3
ifnull 32
aload 3
invokestatic org.glassfish.grizzly.utils.Exceptions.makeIOException:(Ljava/lang/Throwable;)Ljava/io/IOException;
goto 33
StackMap locals:
StackMap stack:
32: new java.io.EOFException
dup
invokespecial java.io.EOFException.<init>:()V
StackMap locals:
StackMap stack: java.io.IOException
33: athrow
34: StackMap locals:
StackMap stack:
getstatic org.glassfish.grizzly.memory.Buffers.EMPTY_BUFFER:Lorg/glassfish/grizzly/Buffer;
astore 4
35: StackMap locals:
StackMap stack:
getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 37
36: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "TCPNIOConnection ({0}) (allocated) read {1} bytes"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
dup
iconst_1
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
37: StackMap locals:
StackMap stack:
aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 38 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
1 38 1 memoryManager Lorg/glassfish/grizzly/memory/MemoryManager;
8 13 2 read I
16 18 2 read I
20 21 2 read I
24 38 2 read I
2 38 3 error Ljava/lang/Throwable;
3 38 4 buffer Lorg/glassfish/grizzly/Buffer;
4 20 5 receiveBufferSize I
6 17 6 ioRecord Lorg/glassfish/grizzly/nio/DirectByteBufferRecord;
7 17 7 directByteBuffer Ljava/nio/ByteBuffer;
22 24 5 e Ljava/lang/Throwable;
Exception table:
from to target type
7 13 13 any
3 20 21 Class java.lang.Throwable
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
connection final
public static int readBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.Buffer);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/Buffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface org.glassfish.grizzly.Buffer.isComposite:()Z
ifeq 1
aload 0
aload 1
checkcast org.glassfish.grizzly.memory.CompositeBuffer
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.readCompositeBuffer:(Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/memory/CompositeBuffer;)I
goto 2
StackMap locals:
StackMap stack:
1: aload 0
aload 1
invokestatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.readSimpleBuffer:(Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/Buffer;)I
StackMap locals:
StackMap stack: int
2: ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 3 1 buffer Lorg/glassfish/grizzly/Buffer;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
connection final
buffer final
public static int readCompositeBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.memory.CompositeBuffer);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/memory/CompositeBuffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=8, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getChannel:()Ljava/nio/channels/SelectableChannel;
checkcast java.nio.channels.SocketChannel
astore 2
start local 2 1: aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.position:()I
istore 3
start local 3 2: aload 1
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.toByteBufferArray:()Lorg/glassfish/grizzly/memory/ByteBufferArray;
astore 4
start local 4 3: aload 4
invokevirtual org.glassfish.grizzly.memory.ByteBufferArray.getArray:()[Ljava/lang/Object;
checkcast java.nio.ByteBuffer[]
astore 5
start local 5 4: aload 4
invokevirtual org.glassfish.grizzly.memory.ByteBufferArray.size:()I
istore 6
start local 6 5: aload 2
aload 5
iconst_0
iload 6
invokevirtual java.nio.channels.SocketChannel.read:([Ljava/nio/ByteBuffer;II)J
l2i
istore 7
start local 7 6: aload 4
invokevirtual org.glassfish.grizzly.memory.ByteBufferArray.restore:()V
7: aload 4
invokevirtual org.glassfish.grizzly.memory.ByteBufferArray.recycle:()V
8: iload 7
ifle 10
9: aload 1
iload 3
iload 7
iadd
invokevirtual org.glassfish.grizzly.memory.CompositeBuffer.position:(I)Lorg/glassfish/grizzly/Buffer;
pop
10: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.memory.CompositeBuffer java.nio.channels.SocketChannel int org.glassfish.grizzly.memory.ByteBufferArray java.nio.ByteBuffer[] int int
StackMap stack:
getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 12
11: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "TCPNIOConnection ({0}) (nonallocated, composite) read {1} bytes"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
dup
iconst_1
iload 7
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
12: StackMap locals:
StackMap stack:
iload 7
ireturn
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 13 1 buffer Lorg/glassfish/grizzly/memory/CompositeBuffer;
1 13 2 socketChannel Ljava/nio/channels/SocketChannel;
2 13 3 oldPos I
3 13 4 array Lorg/glassfish/grizzly/memory/ByteBufferArray;
4 13 5 byteBuffers [Ljava/nio/ByteBuffer;
5 13 6 size I
6 13 7 read I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
connection final
buffer final
public static int readSimpleBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, org.glassfish.grizzly.Buffer);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Lorg/glassfish/grizzly/Buffer;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=7, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getChannel:()Ljava/nio/channels/SelectableChannel;
checkcast java.nio.channels.SocketChannel
astore 2
start local 2 1: aload 1
invokeinterface org.glassfish.grizzly.Buffer.position:()I
istore 3
start local 3 2: aload 1
invokeinterface org.glassfish.grizzly.Buffer.toByteBuffer:()Ljava/nio/ByteBuffer;
astore 4
start local 4 3: aload 4
invokevirtual java.nio.ByteBuffer.position:()I
istore 5
start local 5 4: aload 2
aload 4
invokevirtual java.nio.channels.SocketChannel.read:(Ljava/nio/ByteBuffer;)I
istore 6
start local 6 5: iload 6
ifle 8
6: aload 4
iload 5
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
pop
7: aload 1
iload 3
iload 6
iadd
invokeinterface org.glassfish.grizzly.Buffer.position:(I)Lorg/glassfish/grizzly/Buffer;
pop
8: StackMap locals: org.glassfish.grizzly.nio.transport.TCPNIOConnection org.glassfish.grizzly.Buffer java.nio.channels.SocketChannel int java.nio.ByteBuffer int int
StackMap stack:
getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 10
9: getstatic org.glassfish.grizzly.nio.transport.TCPNIOUtils.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "TCPNIOConnection ({0}) (nonallocated, simple) read {1} bytes"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
dup
iconst_1
iload 6
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
10: StackMap locals:
StackMap stack:
iload 6
ireturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 connection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 11 1 buffer Lorg/glassfish/grizzly/Buffer;
1 11 2 socketChannel Ljava/nio/channels/SocketChannel;
2 11 3 oldPos I
3 11 4 byteBuffer Ljava/nio/ByteBuffer;
4 11 5 bbOldPos I
5 11 6 read I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
connection final
buffer final
private static int readSimpleByteBuffer(org.glassfish.grizzly.nio.transport.TCPNIOConnection, java.nio.ByteBuffer);
descriptor: (Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;Ljava/nio/ByteBuffer;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.glassfish.grizzly.nio.transport.TCPNIOConnection.getChannel:()Ljava/nio/channels/SelectableChannel;
checkcast java.nio.channels.SocketChannel
astore 2
start local 2 1: aload 2
aload 1
invokevirtual java.nio.channels.SocketChannel.read:(Ljava/nio/ByteBuffer;)I
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 tcpConnection Lorg/glassfish/grizzly/nio/transport/TCPNIOConnection;
0 2 1 byteBuffer Ljava/nio/ByteBuffer;
1 2 2 socketChannel Ljava/nio/channels/SocketChannel;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
tcpConnection final
byteBuffer final
}
SourceFile: "TCPNIOUtils.java"