public class org.apache.tomcat.util.buf.ByteBufferUtils
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.tomcat.util.buf.ByteBufferUtils
super_class: java.lang.Object
{
private static final org.apache.tomcat.util.res.StringManager sm;
descriptor: Lorg/apache/tomcat/util/res/StringManager;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.apache.juli.logging.Log log;
descriptor: Lorg/apache/juli/logging/Log;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.Object unsafe;
descriptor: Ljava/lang/Object;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Method cleanerMethod;
descriptor: Ljava/lang/reflect/Method;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Method cleanMethod;
descriptor: Ljava/lang/reflect/Method;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Method invokeCleanerMethod;
descriptor: Ljava/lang/reflect/Method;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=7, args_size=0
0: ldc Lorg/apache/tomcat/util/buf/ByteBufferUtils;
invokestatic org.apache.tomcat.util.res.StringManager.getManager:(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager;
putstatic org.apache.tomcat.util.buf.ByteBufferUtils.sm:Lorg/apache/tomcat/util/res/StringManager;
1: ldc Lorg/apache/tomcat/util/buf/ByteBufferUtils;
invokestatic org.apache.juli.logging.LogFactory.getLog:(Ljava/lang/Class;)Lorg/apache/juli/logging/Log;
putstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
2: iconst_0
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
astore 0
start local 0 3: aconst_null
astore 1
start local 1 4: aconst_null
astore 2
start local 2 5: aconst_null
astore 3
start local 3 6: aconst_null
astore 4
start local 4 7: invokestatic org.apache.tomcat.util.compat.JreCompat.isJre9Available:()Z
ifeq 20
8: ldc "sun.misc.Unsafe"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
astore 5
start local 5 9: aload 5
ldc "theUnsafe"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 6
start local 6 10: aload 6
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
11: aload 6
aconst_null
invokevirtual java.lang.reflect.Field.get:(Ljava/lang/Object;)Ljava/lang/Object;
astore 3
12: aload 5
ldc "invokeCleaner"
iconst_1
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/nio/ByteBuffer;
aastore
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 4
13: aload 4
aload 3
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 6 end local 5 14: goto 30
15: StackMap locals: java.nio.ByteBuffer java.lang.reflect.Method java.lang.reflect.Method java.lang.Object java.lang.reflect.Method
StackMap stack: java.lang.Exception
astore 5
start local 5 16: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.tomcat.util.buf.ByteBufferUtils.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "byteBufferUtils.cleaner"
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;)Ljava/lang/String;
aload 5
invokeinterface org.apache.juli.logging.Log.warn:(Ljava/lang/Object;Ljava/lang/Throwable;)V
17: aconst_null
astore 3
18: aconst_null
astore 4
end local 5 19: goto 30
20: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc "cleaner"
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 1
21: aload 1
iconst_1
invokevirtual java.lang.reflect.Method.setAccessible:(Z)V
22: aload 1
aload 0
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 5
start local 5 23: aload 5
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc "clean"
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 2
24: aload 2
aload 5
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 5 25: goto 30
26: StackMap locals:
StackMap stack: java.lang.Exception
astore 5
start local 5 27: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.tomcat.util.buf.ByteBufferUtils.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "byteBufferUtils.cleaner"
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;)Ljava/lang/String;
aload 5
invokeinterface org.apache.juli.logging.Log.warn:(Ljava/lang/Object;Ljava/lang/Throwable;)V
28: aconst_null
astore 1
29: aconst_null
astore 2
end local 5 30: StackMap locals:
StackMap stack:
aload 1
putstatic org.apache.tomcat.util.buf.ByteBufferUtils.cleanerMethod:Ljava/lang/reflect/Method;
31: aload 2
putstatic org.apache.tomcat.util.buf.ByteBufferUtils.cleanMethod:Ljava/lang/reflect/Method;
32: aload 3
putstatic org.apache.tomcat.util.buf.ByteBufferUtils.unsafe:Ljava/lang/Object;
33: aload 4
putstatic org.apache.tomcat.util.buf.ByteBufferUtils.invokeCleanerMethod:Ljava/lang/reflect/Method;
end local 4 end local 3 end local 2 end local 1 end local 0 34: return
LocalVariableTable:
Start End Slot Name Signature
3 34 0 tempBuffer Ljava/nio/ByteBuffer;
4 34 1 cleanerMethodLocal Ljava/lang/reflect/Method;
5 34 2 cleanMethodLocal Ljava/lang/reflect/Method;
6 34 3 unsafeLocal Ljava/lang/Object;
7 34 4 invokeCleanerMethodLocal Ljava/lang/reflect/Method;
9 14 5 clazz Ljava/lang/Class<*>;
10 14 6 theUnsafe Ljava/lang/reflect/Field;
16 19 5 e Ljava/lang/Exception;
23 25 5 cleanerObject Ljava/lang/Object;
27 30 5 e Ljava/lang/Exception;
Exception table:
from to target type
8 14 15 Class java.lang.IllegalAccessException
8 14 15 Class java.lang.IllegalArgumentException
8 14 15 Class java.lang.reflect.InvocationTargetException
8 14 15 Class java.lang.NoSuchMethodException
8 14 15 Class java.lang.SecurityException
8 14 15 Class java.lang.ClassNotFoundException
8 14 15 Class java.lang.NoSuchFieldException
20 25 26 Class java.lang.NoSuchMethodException
20 25 26 Class java.lang.SecurityException
20 25 26 Class java.lang.IllegalAccessException
20 25 26 Class java.lang.IllegalArgumentException
20 25 26 Class java.lang.reflect.InvocationTargetException
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/tomcat/util/buf/ByteBufferUtils;
public static java.nio.ByteBuffer expand(java.nio.ByteBuffer, int);
descriptor: (Ljava/nio/ByteBuffer;I)Ljava/nio/ByteBuffer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.nio.ByteBuffer.capacity:()I
iload 1
if_icmplt 2
1: aload 0
areturn
2: StackMap locals:
StackMap stack:
iconst_0
istore 3
start local 3 3: aload 0
invokevirtual java.nio.ByteBuffer.isDirect:()Z
ifeq 7
4: iload 1
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
astore 2
start local 2 5: iconst_1
istore 3
6: goto 8
end local 2 7: StackMap locals: java.nio.ByteBuffer int top int
StackMap stack:
iload 1
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
astore 2
start local 2 8: StackMap locals: java.nio.ByteBuffer int java.nio.ByteBuffer int
StackMap stack:
aload 0
invokevirtual java.nio.ByteBuffer.flip:()Ljava/nio/Buffer;
pop
9: aload 2
aload 0
invokevirtual java.nio.ByteBuffer.put:(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
pop
10: iload 3
ifeq 12
11: aload 0
invokestatic org.apache.tomcat.util.buf.ByteBufferUtils.cleanDirectBuffer:(Ljava/nio/ByteBuffer;)V
12: StackMap locals:
StackMap stack:
aload 2
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 in Ljava/nio/ByteBuffer;
0 13 1 newSize I
5 7 2 out Ljava/nio/ByteBuffer;
8 13 2 out Ljava/nio/ByteBuffer;
3 13 3 direct Z
MethodParameters:
Name Flags
in
newSize
public static void cleanDirectBuffer(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=2, args_size=1
start local 0 0: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.cleanMethod:Ljava/lang/reflect/Method;
ifnull 7
1: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.cleanMethod:Ljava/lang/reflect/Method;
getstatic org.apache.tomcat.util.buf.ByteBufferUtils.cleanerMethod:Ljava/lang/reflect/Method;
aload 0
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
2: goto 13
3: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 4: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
invokeinterface org.apache.juli.logging.Log.isDebugEnabled:()Z
ifeq 13
5: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.tomcat.util.buf.ByteBufferUtils.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "byteBufferUtils.cleaner"
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;)Ljava/lang/String;
aload 1
invokeinterface org.apache.juli.logging.Log.debug:(Ljava/lang/Object;Ljava/lang/Throwable;)V
end local 1 6: goto 13
StackMap locals:
StackMap stack:
7: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.invokeCleanerMethod:Ljava/lang/reflect/Method;
ifnull 13
8: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.invokeCleanerMethod:Ljava/lang/reflect/Method;
getstatic org.apache.tomcat.util.buf.ByteBufferUtils.unsafe:Ljava/lang/Object;
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
9: goto 13
10: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 11: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
invokeinterface org.apache.juli.logging.Log.isDebugEnabled:()Z
ifeq 13
12: getstatic org.apache.tomcat.util.buf.ByteBufferUtils.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.tomcat.util.buf.ByteBufferUtils.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "byteBufferUtils.cleaner"
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;)Ljava/lang/String;
aload 1
invokeinterface org.apache.juli.logging.Log.debug:(Ljava/lang/Object;Ljava/lang/Throwable;)V
end local 1 13: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 buf Ljava/nio/ByteBuffer;
4 6 1 e Ljava/lang/Exception;
11 13 1 e Ljava/lang/Exception;
Exception table:
from to target type
1 2 3 Class java.lang.IllegalAccessException
1 2 3 Class java.lang.IllegalArgumentException
1 2 3 Class java.lang.reflect.InvocationTargetException
1 2 3 Class java.lang.SecurityException
8 9 10 Class java.lang.IllegalAccessException
8 9 10 Class java.lang.IllegalArgumentException
8 9 10 Class java.lang.reflect.InvocationTargetException
8 9 10 Class java.lang.SecurityException
MethodParameters:
Name Flags
buf
}
SourceFile: "ByteBufferUtils.java"