📄 bytebuffer.txt
字号:
Compiled from "ByteBuffer.java"
public abstract class java.nio.ByteBuffer extends java.nio.Buffer implements java.lang.Comparable{
final byte[] hb;
Signature: [B
final int offset;
Signature: I
boolean isReadOnly;
Signature: Z
boolean bigEndian;
Signature: Z
boolean nativeByteOrder;
Signature: Z
java.nio.ByteBuffer(int, int, int, int, byte[], int);
Signature: (IIII[BI)V
Code:
0: aload_0
1: iload_1
2: iload_2
3: iload_3
4: iload 4
6: invokespecial #216; //Method java/nio/Buffer."<init>":(IIII)V
9: aload_0
10: iconst_1
11: putfield #199; //Field bigEndian:Z
14: aload_0
15: invokestatic #215; //Method java/nio/Bits.byteOrder:()Ljava/nio/ByteOrder;
18: getstatic #203; //Field java/nio/ByteOrder.BIG_ENDIAN:Ljava/nio/ByteOrder;
21: if_acmpne 28
24: iconst_1
25: goto 29
28: iconst_0
29: putfield #201; //Field nativeByteOrder:Z
32: aload_0
33: aload 5
35: putfield #202; //Field hb:[B
38: aload_0
39: iload 6
41: putfield #198; //Field offset:I
44: return
java.nio.ByteBuffer(int, int, int, int);
Signature: (IIII)V
Code:
0: aload_0
1: iload_1
2: iload_2
3: iload_3
4: iload 4
6: aconst_null
7: iconst_0
8: invokespecial #226; //Method "<init>":(IIII[BI)V
11: return
public static java.nio.ByteBuffer allocateDirect(int);
Signature: (I)Ljava/nio/ByteBuffer;
Code:
0: new #131; //class java/nio/DirectByteBuffer
3: dup
4: iload_0
5: invokespecial #232; //Method java/nio/DirectByteBuffer."<init>":(I)V
8: areturn
public static java.nio.ByteBuffer allocate(int);
Signature: (I)Ljava/nio/ByteBuffer;
Code:
0: iload_0
1: ifge 12
4: new #119; //class java/lang/IllegalArgumentException
7: dup
8: invokespecial #206; //Method java/lang/IllegalArgumentException."<init>":()V
11: athrow
12: new #132; //class java/nio/HeapByteBuffer
15: dup
16: iload_0
17: iload_0
18: invokespecial #233; //Method java/nio/HeapByteBuffer."<init>":(II)V
21: areturn
public static java.nio.ByteBuffer wrap(byte[], int, int);
Signature: ([BII)Ljava/nio/ByteBuffer;
Code:
0: new #132; //class java/nio/HeapByteBuffer
3: dup
4: aload_0
5: iload_1
6: iload_2
7: invokespecial #234; //Method java/nio/HeapByteBuffer."<init>":([BII)V
10: areturn
11: astore_3
12: new #120; //class java/lang/IndexOutOfBoundsException
15: dup
16: invokespecial #207; //Method java/lang/IndexOutOfBoundsException."<init>":()V
19: athrow
Exception table:
from to target type
0 10 11 Class java/lang/IllegalArgumentException
public static java.nio.ByteBuffer wrap(byte[]);
Signature: ([B)Ljava/nio/ByteBuffer;
Code:
0: aload_0
1: iconst_0
2: aload_0
3: arraylength
4: invokestatic #231; //Method wrap:([BII)Ljava/nio/ByteBuffer;
7: areturn
public abstract java.nio.ByteBuffer slice();
Signature: ()Ljava/nio/ByteBuffer;
public abstract java.nio.ByteBuffer duplicate();
Signature: ()Ljava/nio/ByteBuffer;
public abstract java.nio.ByteBuffer asReadOnlyBuffer();
Signature: ()Ljava/nio/ByteBuffer;
public abstract byte get();
Signature: ()B
public abstract java.nio.ByteBuffer put(byte);
Signature: (B)Ljava/nio/ByteBuffer;
public abstract byte get(int);
Signature: (I)B
public abstract java.nio.ByteBuffer put(int, byte);
Signature: (IB)Ljava/nio/ByteBuffer;
public java.nio.ByteBuffer get(byte[], int, int);
Signature: ([BII)Ljava/nio/ByteBuffer;
Code:
0: iload_2
1: iload_3
2: aload_1
3: arraylength
4: invokestatic #225; //Method checkBounds:(III)V
7: iload_3
8: aload_0
9: invokevirtual #223; //Method remaining:()I
12: if_icmple 23
15: new #128; //class java/nio/BufferUnderflowException
18: dup
19: invokespecial #218; //Method java/nio/BufferUnderflowException."<init>":()V
22: athrow
23: iload_2
24: iload_3
25: iadd
26: istore 4
28: iload_2
29: istore 5
31: iload 5
33: iload 4
35: if_icmpge 52
38: aload_1
39: iload 5
41: aload_0
42: invokevirtual #219; //Method get:()B
45: bastore
46: iinc 5, 1
49: goto 31
52: aload_0
53: areturn
public java.nio.ByteBuffer get(byte[]);
Signature: ([B)Ljava/nio/ByteBuffer;
Code:
0: aload_0
1: aload_1
2: iconst_0
3: aload_1
4: arraylength
5: invokevirtual #229; //Method get:([BII)Ljava/nio/ByteBuffer;
8: areturn
public java.nio.ByteBuffer put(java.nio.ByteBuffer);
Signature: (Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
Code:
0: aload_1
1: aload_0
2: if_acmpne 13
5: new #119; //class java/lang/IllegalArgumentException
8: dup
9: invokespecial #206; //Method java/lang/IllegalArgumentException."<init>":()V
12: athrow
13: aload_1
14: invokevirtual #223; //Method remaining:()I
17: istore_2
18: iload_2
19: aload_0
20: invokevirtual #223; //Method remaining:()I
23: if_icmple 34
26: new #127; //class java/nio/BufferOverflowException
29: dup
30: invokespecial #217; //Method java/nio/BufferOverflowException."<init>":()V
33: athrow
34: iconst_0
35: istore_3
36: iload_3
37: iload_2
38: if_icmpge 56
41: aload_0
42: aload_1
43: invokevirtual #219; //Method get:()B
46: invokevirtual #227; //Method put:(B)Ljava/nio/ByteBuffer;
49: pop
50: iinc 3, 1
53: goto 36
56: aload_0
57: areturn
public java.nio.ByteBuffer put(byte[], int, int);
Signature: ([BII)Ljava/nio/ByteBuffer;
Code:
0: iload_2
1: iload_3
2: aload_1
3: arraylength
4: invokestatic #225; //Method checkBounds:(III)V
7: iload_3
8: aload_0
9: invokevirtual #223; //Method remaining:()I
12: if_icmple 23
15: new #127; //class java/nio/BufferOverflowException
18: dup
19: invokespecial #217; //Method java/nio/BufferOverflowException."<init>":()V
22: athrow
23: iload_2
24: iload_3
25: iadd
26: istore 4
28: iload_2
29: istore 5
31: iload 5
33: iload 4
35: if_icmpge 53
38: aload_0
39: aload_1
40: iload 5
42: baload
43: invokevirtual #227; //Method put:(B)Ljava/nio/ByteBuffer;
46: pop
47: iinc 5, 1
50: goto 31
53: aload_0
54: areturn
public final java.nio.ByteBuffer put(byte[]);
Signature: ([B)Ljava/nio/ByteBuffer;
Code:
0: aload_0
1: aload_1
2: iconst_0
3: aload_1
4: arraylength
5: invokevirtual #230; //Method put:([BII)Ljava/nio/ByteBuffer;
8: areturn
public final boolean hasArray();
Signature: ()Z
Code:
0: aload_0
1: getfield #202; //Field hb:[B
4: ifnull 18
7: aload_0
8: getfield #200; //Field isReadOnly:Z
11: ifne 18
14: iconst_1
15: goto 19
18: iconst_0
19: ireturn
public final byte[] array();
Signature: ()[B
Code:
0: aload_0
1: getfield #202; //Field hb:[B
4: ifnonnull 15
7: new #124; //class java/lang/UnsupportedOperationException
10: dup
11: invokespecial #214; //Method java/lang/UnsupportedOperationException."<init>":()V
14: athrow
15: aload_0
16: getfield #200; //Field isReadOnly:Z
19: ifeq 30
22: new #133; //class java/nio/ReadOnlyBufferException
25: dup
26: invokespecial #235; //Method java/nio/ReadOnlyBufferException."<init>":()V
29: athrow
30: aload_0
31: getfield #202; //Field hb:[B
34: areturn
public final int arrayOffset();
Signature: ()I
Code:
0: aload_0
1: getfield #202; //Field hb:[B
4: ifnonnull 15
7: new #124; //class java/lang/UnsupportedOperationException
10: dup
11: invokespecial #214; //Method java/lang/UnsupportedOperationException."<init>":()V
14: athrow
15: aload_0
16: getfield #200; //Field isReadOnly:Z
19: ifeq 30
22: new #133; //class java/nio/ReadOnlyBufferException
25: dup
26: invokespecial #235; //Method java/nio/ReadOnlyBufferException."<init>":()V
29: athrow
30: aload_0
31: getfield #198; //Field offset:I
34: ireturn
public abstract java.nio.ByteBuffer compact();
Signature: ()Ljava/nio/ByteBuffer;
public abstract boolean isDirect();
Signature: ()Z
public java.lang.String toString();
Signature: ()Ljava/lang/String;
Code:
0: new #123; //class java/lang/StringBuffer
3: dup
4: invokespecial #210; //Method java/lang/StringBuffer."<init>":()V
7: astore_1
8: aload_1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -