class org.bson.json.JsonStreamBuffer implements org.bson.json.JsonBuffer
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.bson.json.JsonStreamBuffer
super_class: java.lang.Object
{
private final java.io.Reader reader;
descriptor: Ljava/io/Reader;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.List<java.lang.Integer> markedPositions;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljava/lang/Integer;>;
private final int initialBufferSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private int position;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int lastChar;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean reuseLastChar;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean eof;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private char[] buffer;
descriptor: [C
flags: (0x0002) ACC_PRIVATE
private int bufferStartPos;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int bufferCount;
descriptor: I
flags: (0x0002) ACC_PRIVATE
void <init>(java.io.Reader);
descriptor: (Ljava/io/Reader;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
bipush 16
invokespecial org.bson.json.JsonStreamBuffer.<init>:(Ljava/io/Reader;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/json/JsonStreamBuffer;
0 2 1 reader Ljava/io/Reader;
MethodParameters:
Name Flags
reader final
void <init>(java.io.Reader, int);
descriptor: (Ljava/io/Reader;I)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
2: aload 0
iload 2
putfield org.bson.json.JsonStreamBuffer.initialBufferSize:I
3: aload 0
aload 1
putfield org.bson.json.JsonStreamBuffer.reader:Ljava/io/Reader;
4: aload 0
invokevirtual org.bson.json.JsonStreamBuffer.resetBuffer:()V
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/bson/json/JsonStreamBuffer;
0 6 1 reader Ljava/io/Reader;
0 6 2 initialBufferSize I
MethodParameters:
Name Flags
reader final
initialBufferSize final
public int getPosition();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/json/JsonStreamBuffer;
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.bson.json.JsonStreamBuffer.eof:Z
ifeq 2
1: new org.bson.json.JsonParseException
dup
ldc "Trying to read past EOF."
invokespecial org.bson.json.JsonParseException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.reuseLastChar:Z
ifeq 8
3: aload 0
iconst_0
putfield org.bson.json.JsonStreamBuffer.reuseLastChar:Z
4: aload 0
getfield org.bson.json.JsonStreamBuffer.lastChar:I
istore 1
start local 1 5: aload 0
iconst_m1
putfield org.bson.json.JsonStreamBuffer.lastChar:I
6: aload 0
dup
getfield org.bson.json.JsonStreamBuffer.position:I
iconst_1
iadd
putfield org.bson.json.JsonStreamBuffer.position:I
7: iload 1
ireturn
end local 1 8: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
aload 0
getfield org.bson.json.JsonStreamBuffer.bufferStartPos:I
isub
aload 0
getfield org.bson.json.JsonStreamBuffer.bufferCount:I
if_icmpge 13
9: aload 0
getfield org.bson.json.JsonStreamBuffer.buffer:[C
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
aload 0
getfield org.bson.json.JsonStreamBuffer.bufferStartPos:I
isub
caload
istore 1
start local 1 10: aload 0
iload 1
putfield org.bson.json.JsonStreamBuffer.lastChar:I
11: aload 0
dup
getfield org.bson.json.JsonStreamBuffer.position:I
iconst_1
iadd
putfield org.bson.json.JsonStreamBuffer.position:I
12: iload 1
ireturn
end local 1 13: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifeq 15
14: aload 0
invokevirtual org.bson.json.JsonStreamBuffer.resetBuffer:()V
15: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.reader:Ljava/io/Reader;
invokevirtual java.io.Reader.read:()I
istore 1
start local 1 16: iload 1
iconst_m1
if_icmpeq 19
17: aload 0
iload 1
putfield org.bson.json.JsonStreamBuffer.lastChar:I
18: aload 0
iload 1
i2c
invokevirtual org.bson.json.JsonStreamBuffer.addToBuffer:(C)V
19: StackMap locals: int
StackMap stack:
aload 0
dup
getfield org.bson.json.JsonStreamBuffer.position:I
iconst_1
iadd
putfield org.bson.json.JsonStreamBuffer.position:I
20: iload 1
iconst_m1
if_icmpne 22
21: aload 0
iconst_1
putfield org.bson.json.JsonStreamBuffer.eof:Z
22: StackMap locals:
StackMap stack:
iload 1
23: ireturn
end local 1 24: StackMap locals: org.bson.json.JsonStreamBuffer
StackMap stack: java.io.IOException
astore 1
start local 1 25: new org.bson.json.JsonParseException
dup
aload 1
invokespecial org.bson.json.JsonParseException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lorg/bson/json/JsonStreamBuffer;
5 8 1 reusedChar I
10 13 1 currChar I
16 24 1 nextChar I
25 26 1 e Ljava/io/IOException;
Exception table:
from to target type
15 23 24 Class java.io.IOException
private void resetBuffer();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_m1
putfield org.bson.json.JsonStreamBuffer.bufferStartPos:I
1: aload 0
iconst_0
putfield org.bson.json.JsonStreamBuffer.bufferCount:I
2: aload 0
aload 0
getfield org.bson.json.JsonStreamBuffer.initialBufferSize:I
newarray 5
putfield org.bson.json.JsonStreamBuffer.buffer:[C
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bson/json/JsonStreamBuffer;
public void unread(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
iconst_0
putfield org.bson.json.JsonStreamBuffer.eof:Z
1: iload 1
iconst_m1
if_icmpeq 4
aload 0
getfield org.bson.json.JsonStreamBuffer.lastChar:I
iload 1
if_icmpne 4
2: aload 0
iconst_1
putfield org.bson.json.JsonStreamBuffer.reuseLastChar:Z
3: aload 0
dup
getfield org.bson.json.JsonStreamBuffer.position:I
iconst_1
isub
putfield org.bson.json.JsonStreamBuffer.position:I
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bson/json/JsonStreamBuffer;
0 5 1 c I
MethodParameters:
Name Flags
c final
public int mark();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bson.json.JsonStreamBuffer.bufferCount:I
ifne 2
1: aload 0
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
putfield org.bson.json.JsonStreamBuffer.bufferStartPos:I
2: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.List.contains:(Ljava/lang/Object;)Z
ifne 4
3: aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
4: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bson/json/JsonStreamBuffer;
public void reset(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: iload 1
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
if_icmple 2
1: new java.lang.IllegalStateException
dup
ldc "mark cannot reset ahead of position, only back"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.List.indexOf:(Ljava/lang/Object;)I
istore 2
start local 2 3: iload 2
iconst_m1
if_icmpne 5
4: new java.lang.IllegalArgumentException
dup
ldc "mark invalidated"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: int
StackMap stack:
iload 1
aload 0
getfield org.bson.json.JsonStreamBuffer.position:I
if_icmpeq 7
6: aload 0
iconst_0
putfield org.bson.json.JsonStreamBuffer.reuseLastChar:Z
7: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
iload 2
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
invokeinterface java.util.List.size:()I
invokeinterface java.util.List.subList:(II)Ljava/util/List;
invokeinterface java.util.List.clear:()V
8: aload 0
iload 1
putfield org.bson.json.JsonStreamBuffer.position:I
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/bson/json/JsonStreamBuffer;
0 10 1 markPos I
3 10 2 idx I
MethodParameters:
Name Flags
markPos final
public void discard(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface java.util.List.indexOf:(Ljava/lang/Object;)I
istore 2
start local 2 1: iload 2
iconst_m1
if_icmpne 3
2: return
3: StackMap locals: int
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
iload 2
aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
invokeinterface java.util.List.size:()I
invokeinterface java.util.List.subList:(II)Ljava/util/List;
invokeinterface java.util.List.clear:()V
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/bson/json/JsonStreamBuffer;
0 5 1 markPos I
1 5 2 idx I
MethodParameters:
Name Flags
markPos final
private void addToBuffer(char);
descriptor: (C)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.bson.json.JsonStreamBuffer.markedPositions:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifne 7
1: aload 0
getfield org.bson.json.JsonStreamBuffer.bufferCount:I
aload 0
getfield org.bson.json.JsonStreamBuffer.buffer:[C
arraylength
if_icmpne 5
2: aload 0
getfield org.bson.json.JsonStreamBuffer.buffer:[C
arraylength
iconst_2
imul
newarray 5
astore 2
start local 2 3: aload 0
getfield org.bson.json.JsonStreamBuffer.buffer:[C
iconst_0
aload 2
iconst_0
aload 0
getfield org.bson.json.JsonStreamBuffer.bufferCount:I
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
4: aload 0
aload 2
putfield org.bson.json.JsonStreamBuffer.buffer:[C
end local 2 5: StackMap locals:
StackMap stack:
aload 0
getfield org.bson.json.JsonStreamBuffer.buffer:[C
aload 0
getfield org.bson.json.JsonStreamBuffer.bufferCount:I
iload 1
castore
6: aload 0
dup
getfield org.bson.json.JsonStreamBuffer.bufferCount:I
iconst_1
iadd
putfield org.bson.json.JsonStreamBuffer.bufferCount:I
7: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/bson/json/JsonStreamBuffer;
0 8 1 curChar C
3 5 2 newBuffer [C
MethodParameters:
Name Flags
curChar final
}
SourceFile: "JsonStreamBuffer.java"