final class com.google.common.io.ReaderInputStream extends java.io.InputStream
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.google.common.io.ReaderInputStream
super_class: java.io.InputStream
{
private final java.io.Reader reader;
descriptor: Ljava/io/Reader;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.charset.CharsetEncoder encoder;
descriptor: Ljava/nio/charset/CharsetEncoder;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final byte[] singleByte;
descriptor: [B
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.nio.CharBuffer charBuffer;
descriptor: Ljava/nio/CharBuffer;
flags: (0x0002) ACC_PRIVATE
private java.nio.ByteBuffer byteBuffer;
descriptor: Ljava/nio/ByteBuffer;
flags: (0x0002) ACC_PRIVATE
private boolean endOfInput;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean draining;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean doneFlushing;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
void <init>(java.io.Reader, java.nio.charset.Charset, int);
descriptor: (Ljava/io/Reader;Ljava/nio/charset/Charset;I)V
flags: (0x0000)
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
1: aload 1
2: aload 2
3: invokevirtual java.nio.charset.Charset.newEncoder:()Ljava/nio/charset/CharsetEncoder;
4: getstatic java.nio.charset.CodingErrorAction.REPLACE:Ljava/nio/charset/CodingErrorAction;
invokevirtual java.nio.charset.CharsetEncoder.onMalformedInput:(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
5: getstatic java.nio.charset.CodingErrorAction.REPLACE:Ljava/nio/charset/CodingErrorAction;
invokevirtual java.nio.charset.CharsetEncoder.onUnmappableCharacter:(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
6: iload 3
invokespecial com.google.common.io.ReaderInputStream.<init>:(Ljava/io/Reader;Ljava/nio/charset/CharsetEncoder;I)V
7: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/google/common/io/ReaderInputStream;
0 8 1 reader Ljava/io/Reader;
0 8 2 charset Ljava/nio/charset/Charset;
0 8 3 bufferSize I
MethodParameters:
Name Flags
reader
charset
bufferSize
void <init>(java.io.Reader, java.nio.charset.CharsetEncoder, int);
descriptor: (Ljava/io/Reader;Ljava/nio/charset/CharsetEncoder;I)V
flags: (0x0000)
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.io.InputStream.<init>:()V
1: aload 0
iconst_1
newarray 8
putfield com.google.common.io.ReaderInputStream.singleByte:[B
2: aload 0
aload 1
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.io.Reader
putfield com.google.common.io.ReaderInputStream.reader:Ljava/io/Reader;
3: aload 0
aload 2
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.nio.charset.CharsetEncoder
putfield com.google.common.io.ReaderInputStream.encoder:Ljava/nio/charset/CharsetEncoder;
4: iload 3
ifle 5
iconst_1
goto 6
StackMap locals: com.google.common.io.ReaderInputStream java.io.Reader java.nio.charset.CharsetEncoder int
StackMap stack:
5: iconst_0
StackMap locals:
StackMap stack: int
6: ldc "bufferSize must be positive: %s"
iload 3
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;I)V
7: aload 2
invokevirtual java.nio.charset.CharsetEncoder.reset:()Ljava/nio/charset/CharsetEncoder;
pop
8: aload 0
iload 3
invokestatic java.nio.CharBuffer.allocate:(I)Ljava/nio/CharBuffer;
putfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
9: aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokevirtual java.nio.CharBuffer.flip:()Ljava/nio/Buffer;
pop
10: aload 0
iload 3
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
putfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
11: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/google/common/io/ReaderInputStream;
0 12 1 reader Ljava/io/Reader;
0 12 2 encoder Ljava/nio/charset/CharsetEncoder;
0 12 3 bufferSize I
MethodParameters:
Name Flags
reader
encoder
bufferSize
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.io.ReaderInputStream.reader:Ljava/io/Reader;
invokevirtual java.io.Reader.close:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/google/common/io/ReaderInputStream;
Exceptions:
throws java.io.IOException
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield com.google.common.io.ReaderInputStream.singleByte:[B
invokevirtual com.google.common.io.ReaderInputStream.read:([B)I
iconst_1
if_icmpne 1
aload 0
getfield com.google.common.io.ReaderInputStream.singleByte:[B
iconst_0
baload
invokestatic com.google.common.primitives.UnsignedBytes.toInt:(B)I
goto 2
StackMap locals:
StackMap stack:
1: iconst_m1
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/io/ReaderInputStream;
Exceptions:
throws java.io.IOException
public int read(byte[], int, int);
descriptor: ([BII)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 2
iload 2
iload 3
iadd
aload 1
arraylength
invokestatic com.google.common.base.Preconditions.checkPositionIndexes:(III)V
1: iload 3
ifne 3
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack:
iconst_0
istore 4
start local 4 4: aload 0
getfield com.google.common.io.ReaderInputStream.endOfInput:Z
istore 5
start local 5 5: StackMap locals: int int
StackMap stack:
aload 0
getfield com.google.common.io.ReaderInputStream.draining:Z
ifeq 13
6: iload 4
aload 0
aload 1
iload 2
iload 4
iadd
iload 3
iload 4
isub
invokevirtual com.google.common.io.ReaderInputStream.drain:([BII)I
iadd
istore 4
7: iload 4
iload 3
if_icmpeq 8
aload 0
getfield com.google.common.io.ReaderInputStream.doneFlushing:Z
ifeq 11
8: StackMap locals:
StackMap stack:
iload 4
ifle 9
iload 4
goto 10
StackMap locals:
StackMap stack:
9: iconst_m1
StackMap locals:
StackMap stack: int
10: ireturn
11: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield com.google.common.io.ReaderInputStream.draining:Z
12: aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.clear:()Ljava/nio/Buffer;
pop
13: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.io.ReaderInputStream.doneFlushing:Z
ifeq 16
14: getstatic java.nio.charset.CoderResult.UNDERFLOW:Ljava/nio/charset/CoderResult;
astore 6
start local 6 15: goto 20
end local 6 StackMap locals:
StackMap stack:
16: iload 5
ifeq 19
17: aload 0
getfield com.google.common.io.ReaderInputStream.encoder:Ljava/nio/charset/CharsetEncoder;
aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.charset.CharsetEncoder.flush:(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;
astore 6
start local 6 18: goto 20
end local 6 19: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.io.ReaderInputStream.encoder:Ljava/nio/charset/CharsetEncoder;
aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
aload 0
getfield com.google.common.io.ReaderInputStream.endOfInput:Z
invokevirtual java.nio.charset.CharsetEncoder.encode:(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;
astore 6
start local 6 20: StackMap locals: java.nio.charset.CoderResult
StackMap stack:
aload 6
invokevirtual java.nio.charset.CoderResult.isOverflow:()Z
ifeq 23
21: aload 0
iconst_1
invokevirtual com.google.common.io.ReaderInputStream.startDraining:(Z)V
22: goto 5
23: StackMap locals:
StackMap stack:
aload 6
invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
ifeq 33
24: iload 5
ifeq 28
25: aload 0
iconst_1
putfield com.google.common.io.ReaderInputStream.doneFlushing:Z
26: aload 0
iconst_0
invokevirtual com.google.common.io.ReaderInputStream.startDraining:(Z)V
27: goto 5
28: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.io.ReaderInputStream.endOfInput:Z
ifeq 31
29: iconst_1
istore 5
30: goto 13
31: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.google.common.io.ReaderInputStream.readMoreChars:()V
32: goto 13
StackMap locals:
StackMap stack:
33: aload 6
invokevirtual java.nio.charset.CoderResult.isError:()Z
ifeq 13
34: aload 6
invokevirtual java.nio.charset.CoderResult.throwException:()V
35: iconst_0
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 36 0 this Lcom/google/common/io/ReaderInputStream;
0 36 1 b [B
0 36 2 off I
0 36 3 len I
4 36 4 totalBytesRead I
5 36 5 doneEncoding Z
15 16 6 result Ljava/nio/charset/CoderResult;
18 19 6 result Ljava/nio/charset/CoderResult;
20 36 6 result Ljava/nio/charset/CoderResult;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
private static java.nio.CharBuffer grow(java.nio.CharBuffer);
descriptor: (Ljava/nio/CharBuffer;)Ljava/nio/CharBuffer;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual java.nio.CharBuffer.array:()[C
aload 0
invokevirtual java.nio.CharBuffer.capacity:()I
iconst_2
imul
invokestatic java.util.Arrays.copyOf:([CI)[C
astore 1
start local 1 1: aload 1
invokestatic java.nio.CharBuffer.wrap:([C)Ljava/nio/CharBuffer;
astore 2
start local 2 2: aload 2
aload 0
invokevirtual java.nio.CharBuffer.position:()I
invokevirtual java.nio.CharBuffer.position:(I)Ljava/nio/Buffer;
pop
3: aload 2
aload 0
invokevirtual java.nio.CharBuffer.limit:()I
invokevirtual java.nio.CharBuffer.limit:(I)Ljava/nio/Buffer;
pop
4: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 buf Ljava/nio/CharBuffer;
1 5 1 copy [C
2 5 2 bigger Ljava/nio/CharBuffer;
MethodParameters:
Name Flags
buf
private void readMoreChars();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokestatic com.google.common.io.ReaderInputStream.availableCapacity:(Ljava/nio/Buffer;)I
ifne 5
1: aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokevirtual java.nio.CharBuffer.position:()I
ifle 4
2: aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokevirtual java.nio.CharBuffer.compact:()Ljava/nio/CharBuffer;
invokevirtual java.nio.CharBuffer.flip:()Ljava/nio/Buffer;
pop
3: goto 5
4: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokestatic com.google.common.io.ReaderInputStream.grow:(Ljava/nio/CharBuffer;)Ljava/nio/CharBuffer;
putfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
5: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokevirtual java.nio.CharBuffer.limit:()I
istore 1
start local 1 6: aload 0
getfield com.google.common.io.ReaderInputStream.reader:Ljava/io/Reader;
aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokevirtual java.nio.CharBuffer.array:()[C
iload 1
aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
invokestatic com.google.common.io.ReaderInputStream.availableCapacity:(Ljava/nio/Buffer;)I
invokevirtual java.io.Reader.read:([CII)I
istore 2
start local 2 7: iload 2
iconst_m1
if_icmpne 10
8: aload 0
iconst_1
putfield com.google.common.io.ReaderInputStream.endOfInput:Z
9: goto 11
10: StackMap locals: int int
StackMap stack:
aload 0
getfield com.google.common.io.ReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
iload 1
iload 2
iadd
invokevirtual java.nio.CharBuffer.limit:(I)Ljava/nio/Buffer;
pop
11: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/google/common/io/ReaderInputStream;
6 12 1 limit I
7 12 2 numChars I
Exceptions:
throws java.io.IOException
private static int availableCapacity(java.nio.Buffer);
descriptor: (Ljava/nio/Buffer;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.nio.Buffer.capacity:()I
aload 0
invokevirtual java.nio.Buffer.limit:()I
isub
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 buffer Ljava/nio/Buffer;
MethodParameters:
Name Flags
buffer
private void startDraining(boolean);
descriptor: (Z)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.flip:()Ljava/nio/Buffer;
pop
1: iload 1
ifeq 4
aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.remaining:()I
ifne 4
2: aload 0
aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.capacity:()I
iconst_2
imul
invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
putfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
3: goto 5
4: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield com.google.common.io.ReaderInputStream.draining:Z
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/google/common/io/ReaderInputStream;
0 6 1 overflow Z
MethodParameters:
Name Flags
overflow
private int drain(byte[], int, int);
descriptor: ([BII)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 3
aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.remaining:()I
invokestatic java.lang.Math.min:(II)I
istore 4
start local 4 1: aload 0
getfield com.google.common.io.ReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
aload 1
iload 2
iload 4
invokevirtual java.nio.ByteBuffer.get:([BII)Ljava/nio/ByteBuffer;
pop
2: iload 4
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/io/ReaderInputStream;
0 3 1 b [B
0 3 2 off I
0 3 3 len I
1 3 4 remaining I
MethodParameters:
Name Flags
b
off
len
}
SourceFile: "ReaderInputStream.java"
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()