public final class com.google.common.io.CharStreams
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.google.common.io.CharStreams
super_class: java.lang.Object
{
private static final int DEFAULT_BUF_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2048
static java.nio.CharBuffer createBuffer();
descriptor: ()Ljava/nio/CharBuffer;
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: sipush 2048
invokestatic java.nio.CharBuffer.allocate:(I)Ljava/nio/CharBuffer;
areturn
LocalVariableTable:
Start End Slot Name Signature
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
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/io/CharStreams;
public static long copy(java.lang.Readable, java.lang.Appendable);
descriptor: (Ljava/lang/Readable;Ljava/lang/Appendable;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
instanceof java.io.Reader
ifeq 4
1: aload 1
instanceof java.lang.StringBuilder
ifeq 3
2: aload 0
checkcast java.io.Reader
aload 1
checkcast java.lang.StringBuilder
invokestatic com.google.common.io.CharStreams.copyReaderToBuilder:(Ljava/io/Reader;Ljava/lang/StringBuilder;)J
lreturn
3: StackMap locals:
StackMap stack:
aload 0
checkcast java.io.Reader
aload 1
invokestatic com.google.common.io.CharStreams.asWriter:(Ljava/lang/Appendable;)Ljava/io/Writer;
invokestatic com.google.common.io.CharStreams.copyReaderToWriter:(Ljava/io/Reader;Ljava/io/Writer;)J
lreturn
4: StackMap locals:
StackMap stack:
aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
5: aload 1
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
6: lconst_0
lstore 2
start local 2 7: invokestatic com.google.common.io.CharStreams.createBuffer:()Ljava/nio/CharBuffer;
astore 4
start local 4 8: goto 13
9: StackMap locals: long java.nio.CharBuffer
StackMap stack:
aload 4
invokevirtual java.nio.CharBuffer.flip:()Ljava/nio/Buffer;
pop
10: aload 1
aload 4
invokeinterface java.lang.Appendable.append:(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
pop
11: lload 2
aload 4
invokevirtual java.nio.CharBuffer.remaining:()I
i2l
ladd
lstore 2
12: aload 4
invokevirtual java.nio.CharBuffer.clear:()Ljava/nio/Buffer;
pop
13: StackMap locals:
StackMap stack:
aload 0
aload 4
invokeinterface java.lang.Readable.read:(Ljava/nio/CharBuffer;)I
iconst_m1
if_icmpne 9
14: lload 2
lreturn
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 from Ljava/lang/Readable;
0 15 1 to Ljava/lang/Appendable;
7 15 2 total J
8 15 4 buf Ljava/nio/CharBuffer;
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
from
to
static long copyReaderToBuilder(java.io.Reader, java.lang.StringBuilder);
descriptor: (Ljava/io/Reader;Ljava/lang/StringBuilder;)J
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: sipush 2048
newarray 5
astore 2
start local 2 3: lconst_0
lstore 4
start local 4 4: goto 7
start local 3 5: StackMap locals: char[] int long
StackMap stack:
aload 1
aload 2
iconst_0
iload 3
invokevirtual java.lang.StringBuilder.append:([CII)Ljava/lang/StringBuilder;
pop
6: lload 4
iload 3
i2l
ladd
lstore 4
end local 3 7: StackMap locals: java.io.Reader java.lang.StringBuilder char[] top long
StackMap stack:
aload 0
aload 2
invokevirtual java.io.Reader.read:([C)I
dup
istore 3
start local 3 8: iconst_m1
if_icmpne 5
9: lload 4
lreturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 from Ljava/io/Reader;
0 10 1 to Ljava/lang/StringBuilder;
3 10 2 buf [C
5 7 3 nRead I
8 10 3 nRead I
4 10 4 total J
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
from
to
static long copyReaderToWriter(java.io.Reader, java.io.Writer);
descriptor: (Ljava/io/Reader;Ljava/io/Writer;)J
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: sipush 2048
newarray 5
astore 2
start local 2 3: lconst_0
lstore 4
start local 4 4: goto 7
start local 3 5: StackMap locals: char[] int long
StackMap stack:
aload 1
aload 2
iconst_0
iload 3
invokevirtual java.io.Writer.write:([CII)V
6: lload 4
iload 3
i2l
ladd
lstore 4
end local 3 7: StackMap locals: java.io.Reader java.io.Writer char[] top long
StackMap stack:
aload 0
aload 2
invokevirtual java.io.Reader.read:([C)I
dup
istore 3
start local 3 8: iconst_m1
if_icmpne 5
9: lload 4
lreturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 from Ljava/io/Reader;
0 10 1 to Ljava/io/Writer;
3 10 2 buf [C
5 7 3 nRead I
8 10 3 nRead I
4 10 4 total J
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
from
to
public static java.lang.String toString(java.lang.Readable);
descriptor: (Ljava/lang/Readable;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.io.CharStreams.toStringBuilder:(Ljava/lang/Readable;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 r Ljava/lang/Readable;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
r
private static java.lang.StringBuilder toStringBuilder(java.lang.Readable);
descriptor: (Ljava/lang/Readable;)Ljava/lang/StringBuilder;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 1
start local 1 1: aload 0
instanceof java.io.Reader
ifeq 4
2: aload 0
checkcast java.io.Reader
aload 1
invokestatic com.google.common.io.CharStreams.copyReaderToBuilder:(Ljava/io/Reader;Ljava/lang/StringBuilder;)J
pop2
3: goto 5
4: StackMap locals: java.lang.StringBuilder
StackMap stack:
aload 0
aload 1
invokestatic com.google.common.io.CharStreams.copy:(Ljava/lang/Readable;Ljava/lang/Appendable;)J
pop2
5: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 r Ljava/lang/Readable;
1 6 1 sb Ljava/lang/StringBuilder;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
r
public static java.util.List<java.lang.String> readLines(java.lang.Readable);
descriptor: (Ljava/lang/Readable;)Ljava/util/List;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 1: new com.google.common.io.LineReader
dup
aload 0
invokespecial com.google.common.io.LineReader.<init>:(Ljava/lang/Readable;)V
astore 2
start local 2 2: goto 4
start local 3 3: StackMap locals: java.util.List com.google.common.io.LineReader java.lang.String
StackMap stack:
aload 1
aload 3
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 4: StackMap locals:
StackMap stack:
aload 2
invokevirtual com.google.common.io.LineReader.readLine:()Ljava/lang/String;
dup
astore 3
start local 3 5: ifnonnull 3
6: aload 1
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 r Ljava/lang/Readable;
1 7 1 result Ljava/util/List<Ljava/lang/String;>;
2 7 2 lineReader Lcom/google/common/io/LineReader;
3 4 3 line Ljava/lang/String;
5 7 3 line Ljava/lang/String;
Exceptions:
throws java.io.IOException
Signature: (Ljava/lang/Readable;)Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
r
public static <T> T readLines(java.lang.Readable, com.google.common.io.LineProcessor<T>);
descriptor: (Ljava/lang/Readable;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: new com.google.common.io.LineReader
dup
aload 0
invokespecial com.google.common.io.LineReader.<init>:(Ljava/lang/Readable;)V
astore 2
start local 2 3: goto 6
start local 3 4: StackMap locals: com.google.common.io.LineReader java.lang.String
StackMap stack:
aload 1
aload 3
invokeinterface com.google.common.io.LineProcessor.processLine:(Ljava/lang/String;)Z
ifne 6
5: goto 8
end local 3 6: StackMap locals:
StackMap stack:
aload 2
invokevirtual com.google.common.io.LineReader.readLine:()Ljava/lang/String;
dup
astore 3
start local 3 7: ifnonnull 4
8: StackMap locals: java.lang.String
StackMap stack:
aload 1
invokeinterface com.google.common.io.LineProcessor.getResult:()Ljava/lang/Object;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 readable Ljava/lang/Readable;
0 9 1 processor Lcom/google/common/io/LineProcessor<TT;>;
3 9 2 lineReader Lcom/google/common/io/LineReader;
4 6 3 line Ljava/lang/String;
7 9 3 line Ljava/lang/String;
Exceptions:
throws java.io.IOException
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Readable;Lcom/google/common/io/LineProcessor<TT;>;)TT;
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
readable
processor
public static long exhaust(java.lang.Readable);
descriptor: (Ljava/lang/Readable;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: lconst_0
lstore 1
start local 1 1: invokestatic com.google.common.io.CharStreams.createBuffer:()Ljava/nio/CharBuffer;
astore 5
start local 5 2: goto 5
start local 3 3: StackMap locals: long long java.nio.CharBuffer
StackMap stack:
lload 1
lload 3
ladd
lstore 1
4: aload 5
invokevirtual java.nio.CharBuffer.clear:()Ljava/nio/Buffer;
pop
end local 3 5: StackMap locals: java.lang.Readable long top top java.nio.CharBuffer
StackMap stack:
aload 0
aload 5
invokeinterface java.lang.Readable.read:(Ljava/nio/CharBuffer;)I
i2l
dup2
lstore 3
start local 3 6: ldc -1
lcmp
ifne 3
7: lload 1
lreturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 readable Ljava/lang/Readable;
1 8 1 total J
3 5 3 read J
6 8 3 read J
2 8 5 buf Ljava/nio/CharBuffer;
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
readable
public static void skipFully(java.io.Reader, long);
descriptor: (Ljava/io/Reader;J)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: goto 6
2: StackMap locals:
StackMap stack:
aload 0
lload 1
invokevirtual java.io.Reader.skip:(J)J
lstore 3
start local 3 3: lload 3
lconst_0
lcmp
ifne 5
4: new java.io.EOFException
dup
invokespecial java.io.EOFException.<init>:()V
athrow
5: StackMap locals: long
StackMap stack:
lload 1
lload 3
lsub
lstore 1
end local 3 6: StackMap locals:
StackMap stack:
lload 1
lconst_0
lcmp
ifgt 2
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 reader Ljava/io/Reader;
0 8 1 n J
3 6 3 amt J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
reader
n
public static java.io.Writer nullWriter();
descriptor: ()Ljava/io/Writer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic com.google.common.io.CharStreams$NullWriter.INSTANCE:Lcom/google/common/io/CharStreams$NullWriter;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static java.io.Writer asWriter(java.lang.Appendable);
descriptor: (Ljava/lang/Appendable;)Ljava/io/Writer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
instanceof java.io.Writer
ifeq 2
1: aload 0
checkcast java.io.Writer
areturn
2: StackMap locals:
StackMap stack:
new com.google.common.io.AppendableWriter
dup
aload 0
invokespecial com.google.common.io.AppendableWriter.<init>:(Ljava/lang/Appendable;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 target Ljava/lang/Appendable;
MethodParameters:
Name Flags
target
}
SourceFile: "CharStreams.java"
NestMembers:
com.google.common.io.CharStreams$NullWriter
InnerClasses:
private final NullWriter = com.google.common.io.CharStreams$NullWriter of com.google.common.io.CharStreams
RuntimeInvisibleAnnotations:
com.google.common.annotations.Beta()
com.google.common.annotations.GwtIncompatible()