public class org.bson.io.BasicOutputBuffer extends org.bson.io.OutputBuffer
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bson.io.BasicOutputBuffer
super_class: org.bson.io.OutputBuffer
{
private byte[] buffer;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int position;
descriptor: I
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
sipush 1024
invokespecial org.bson.io.BasicOutputBuffer.<init>:(I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/io/BasicOutputBuffer;
public void <init>(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial org.bson.io.OutputBuffer.<init>:()V
1: aload 0
sipush 1024
newarray 8
putfield org.bson.io.BasicOutputBuffer.buffer:[B
2: aload 0
iload 1
newarray 8
putfield org.bson.io.BasicOutputBuffer.buffer:[B
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bson/io/BasicOutputBuffer;
0 4 1 initialSize I
MethodParameters:
Name Flags
initialSize final
public byte[] getInternalBuffer();
descriptor: ()[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/io/BasicOutputBuffer;
public void write(byte[]);
descriptor: ([B)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: aload 0
aload 1
iconst_0
aload 1
arraylength
invokevirtual org.bson.io.BasicOutputBuffer.write:([BII)V
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bson/io/BasicOutputBuffer;
0 3 1 b [B
MethodParameters:
Name Flags
b final
public void writeBytes(byte[], int, int);
descriptor: ([BII)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: aload 0
iload 3
invokevirtual org.bson.io.BasicOutputBuffer.ensure:(I)V
2: aload 1
iload 2
aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
iload 3
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
3: aload 0
dup
getfield org.bson.io.BasicOutputBuffer.position:I
iload 3
iadd
putfield org.bson.io.BasicOutputBuffer.position:I
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bson/io/BasicOutputBuffer;
0 5 1 bytes [B
0 5 2 offset I
0 5 3 length I
MethodParameters:
Name Flags
bytes final
offset final
length final
public void writeByte(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: aload 0
iconst_1
invokevirtual org.bson.io.BasicOutputBuffer.ensure:(I)V
2: aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
aload 0
dup
getfield org.bson.io.BasicOutputBuffer.position:I
dup_x1
iconst_1
iadd
putfield org.bson.io.BasicOutputBuffer.position:I
sipush 255
iload 1
iand
i2b
bastore
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bson/io/BasicOutputBuffer;
0 4 1 value I
MethodParameters:
Name Flags
value final
protected void write(int, int);
descriptor: (II)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: iload 1
ifge 3
2: new java.lang.IllegalArgumentException
dup
ldc "position must be >= 0 but was %d"
iconst_1
anewarray java.lang.Object
dup
iconst_0
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
iload 1
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
iconst_1
isub
if_icmple 5
4: new java.lang.IllegalArgumentException
dup
ldc "position must be <= %d but was %d"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
iconst_1
isub
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
iload 1
sipush 255
iload 2
iand
i2b
bastore
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/bson/io/BasicOutputBuffer;
0 7 1 absolutePosition I
0 7 2 value I
MethodParameters:
Name Flags
absolutePosition final
value final
public int getPosition();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/io/BasicOutputBuffer;
public int getSize();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/io/BasicOutputBuffer;
public int pipe(java.io.OutputStream);
descriptor: (Ljava/io/OutputStream;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: aload 1
aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
iconst_0
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
invokevirtual java.io.OutputStream.write:([BII)V
2: aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bson/io/BasicOutputBuffer;
0 3 1 out Ljava/io/OutputStream;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
out final
public void truncateToPosition(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: iload 1
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
if_icmpgt 2
iload 1
ifge 3
2: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
invokespecial java.lang.IllegalArgumentException.<init>:()V
athrow
3: StackMap locals:
StackMap stack:
aload 0
iload 1
putfield org.bson.io.BasicOutputBuffer.position:I
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bson/io/BasicOutputBuffer;
0 5 1 newPosition I
MethodParameters:
Name Flags
newPosition final
public java.util.List<org.bson.ByteBuf> getByteBuffers();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.bson.io.BasicOutputBuffer.ensureOpen:()V
1: iconst_1
anewarray org.bson.ByteBuf
dup
iconst_0
new org.bson.ByteBufNIO
dup
aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
iconst_0
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
invokestatic java.nio.ByteBuffer.wrap:([BII)Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.duplicate:()Ljava/nio/ByteBuffer;
getstatic java.nio.ByteOrder.LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invokevirtual java.nio.ByteBuffer.order:(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
invokespecial org.bson.ByteBufNIO.<init>:(Ljava/nio/ByteBuffer;)V
aastore
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/io/BasicOutputBuffer;
Signature: ()Ljava/util/List<Lorg/bson/ByteBuf;>;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
putfield org.bson.io.BasicOutputBuffer.buffer:[B
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/io/BasicOutputBuffer;
private void ensureOpen();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
ifnonnull 2
1: new java.lang.IllegalStateException
dup
ldc "The output is closed"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bson/io/BasicOutputBuffer;
private void ensure(int);
descriptor: (I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
iload 1
iadd
istore 2
start local 2 1: iload 2
aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
arraylength
if_icmpgt 3
2: return
3: StackMap locals: int
StackMap stack:
aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
arraylength
iconst_2
imul
istore 3
start local 3 4: iload 3
iload 2
if_icmpge 6
5: iload 2
sipush 128
iadd
istore 3
6: StackMap locals: int
StackMap stack:
iload 3
newarray 8
astore 4
start local 4 7: aload 0
getfield org.bson.io.BasicOutputBuffer.buffer:[B
iconst_0
aload 4
iconst_0
aload 0
getfield org.bson.io.BasicOutputBuffer.position:I
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: aload 0
aload 4
putfield org.bson.io.BasicOutputBuffer.buffer:[B
9: return
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/bson/io/BasicOutputBuffer;
0 10 1 more I
1 10 2 need I
4 10 3 newSize I
7 10 4 n [B
MethodParameters:
Name Flags
more final
}
SourceFile: "BasicOutputBuffer.java"