public final class com.google.common.io.ByteStreams
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.google.common.io.ByteStreams
super_class: java.lang.Object
{
private static final int BUFFER_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 8192
private static final int ZERO_COPY_CHUNK_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 524288
private static final int MAX_ARRAY_LEN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2147483639
private static final int TO_BYTE_ARRAY_DEQUE_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 20
private static final java.io.OutputStream NULL_OUTPUT_STREAM;
descriptor: Ljava/io/OutputStream;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new com.google.common.io.ByteStreams$1
dup
invokespecial com.google.common.io.ByteStreams$1.<init>:()V
1: putstatic com.google.common.io.ByteStreams.NULL_OUTPUT_STREAM:Ljava/io/OutputStream;
2: return
LocalVariableTable:
Start End Slot Name Signature
static byte[] createBuffer();
descriptor: ()[B
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: sipush 8192
newarray 8
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/ByteStreams;
public static long copy(java.io.InputStream, java.io.OutputStream);
descriptor: (Ljava/io/InputStream;Ljava/io/OutputStream;)J
flags: (0x0009) ACC_PUBLIC, 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: invokestatic com.google.common.io.ByteStreams.createBuffer:()[B
astore 2
start local 2 3: lconst_0
lstore 3
start local 3 4: StackMap locals: byte[] long
StackMap stack:
aload 0
aload 2
invokevirtual java.io.InputStream.read:([B)I
istore 5
start local 5 5: iload 5
iconst_m1
if_icmpne 7
6: goto 10
7: StackMap locals: int
StackMap stack:
aload 1
aload 2
iconst_0
iload 5
invokevirtual java.io.OutputStream.write:([BII)V
8: lload 3
iload 5
i2l
ladd
lstore 3
end local 5 9: goto 4
10: StackMap locals:
StackMap stack:
lload 3
lreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 from Ljava/io/InputStream;
0 11 1 to Ljava/io/OutputStream;
3 11 2 buf [B
4 11 3 total J
5 9 5 r I
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
from
to
public static long copy(java.nio.channels.ReadableByteChannel, java.nio.channels.WritableByteChannel);
descriptor: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/channels/WritableByteChannel;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=9, 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: aload 0
instanceof java.nio.channels.FileChannel
ifeq 12
3: aload 0
checkcast java.nio.channels.FileChannel
astore 2
start local 2 4: aload 2
invokevirtual java.nio.channels.FileChannel.position:()J
lstore 3
start local 3 5: lload 3
lstore 5
start local 5 6: StackMap locals: java.nio.channels.FileChannel long long
StackMap stack:
aload 2
lload 5
ldc 524288
aload 1
invokevirtual java.nio.channels.FileChannel.transferTo:(JJLjava/nio/channels/WritableByteChannel;)J
lstore 7
start local 7 7: lload 5
lload 7
ladd
lstore 5
8: aload 2
lload 5
invokevirtual java.nio.channels.FileChannel.position:(J)Ljava/nio/channels/FileChannel;
pop
9: lload 7
lconst_0
lcmp
ifgt 6
lload 5
aload 2
invokevirtual java.nio.channels.FileChannel.size:()J
10: lcmp
iflt 6
11: lload 5
lload 3
lsub
lreturn
end local 7 end local 5 end local 3 end local 2 12: StackMap locals:
StackMap stack:
invokestatic com.google.common.io.ByteStreams.createBuffer:()[B
invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
astore 2
start local 2 13: lconst_0
lstore 3
start local 3 14: goto 20
15: StackMap locals: java.nio.ByteBuffer long
StackMap stack:
aload 2
invokevirtual java.nio.ByteBuffer.flip:()Ljava/nio/Buffer;
pop
16: goto 18
17: StackMap locals:
StackMap stack:
lload 3
aload 1
aload 2
invokeinterface java.nio.channels.WritableByteChannel.write:(Ljava/nio/ByteBuffer;)I
i2l
ladd
lstore 3
18: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
ifne 17
19: aload 2
invokevirtual java.nio.ByteBuffer.clear:()Ljava/nio/Buffer;
pop
20: StackMap locals:
StackMap stack:
aload 0
aload 2
invokeinterface java.nio.channels.ReadableByteChannel.read:(Ljava/nio/ByteBuffer;)I
iconst_m1
if_icmpne 15
21: lload 3
lreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 from Ljava/nio/channels/ReadableByteChannel;
0 22 1 to Ljava/nio/channels/WritableByteChannel;
4 12 2 sourceChannel Ljava/nio/channels/FileChannel;
5 12 3 oldPosition J
6 12 5 position J
7 12 7 copied J
13 22 2 buf Ljava/nio/ByteBuffer;
14 22 3 total J
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
from
to
private static byte[] toByteArrayInternal(java.io.InputStream, java.util.Deque<byte[]>, );
descriptor: (Ljava/io/InputStream;Ljava/util/Deque;I)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=7, args_size=3
start local 0 start local 1 start local 2 0: sipush 8192
istore 3
start local 3 1: goto 13
2: StackMap locals: int
StackMap stack:
iload 3
ldc 2147483639
iload 2
isub
invokestatic java.lang.Math.min:(II)I
newarray 8
astore 4
start local 4 3: aload 1
aload 4
invokeinterface java.util.Deque.add:(Ljava/lang/Object;)Z
pop
4: iconst_0
istore 5
start local 5 5: goto 11
6: StackMap locals: byte[] int
StackMap stack:
aload 0
aload 4
iload 5
aload 4
arraylength
iload 5
isub
invokevirtual java.io.InputStream.read:([BII)I
istore 6
start local 6 7: iload 6
iconst_m1
if_icmpne 9
8: aload 1
iload 2
invokestatic com.google.common.io.ByteStreams.combineBuffers:(Ljava/util/Deque;I)[B
areturn
9: StackMap locals: int
StackMap stack:
iload 5
iload 6
iadd
istore 5
10: iload 2
iload 6
iadd
istore 2
end local 6 11: StackMap locals:
StackMap stack:
iload 5
aload 4
arraylength
if_icmplt 6
end local 5 end local 4 12: iload 3
iconst_2
invokestatic com.google.common.math.IntMath.saturatedMultiply:(II)I
istore 3
13: StackMap locals:
StackMap stack:
iload 2
ldc 2147483639
14: if_icmplt 2
end local 3 15: aload 0
invokevirtual java.io.InputStream.read:()I
iconst_m1
if_icmpne 17
16: aload 1
ldc 2147483639
invokestatic com.google.common.io.ByteStreams.combineBuffers:(Ljava/util/Deque;I)[B
areturn
17: StackMap locals:
StackMap stack:
new java.lang.OutOfMemoryError
dup
ldc "input is too large to fit in a byte array"
invokespecial java.lang.OutOfMemoryError.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 in Ljava/io/InputStream;
0 18 1 bufs Ljava/util/Deque<[B>;
0 18 2 totalLen I
1 15 3 bufSize I
3 12 4 buf [B
5 12 5 off I
7 11 6 r I
Exceptions:
throws java.io.IOException
Signature: (Ljava/io/InputStream;Ljava/util/Deque<[B>;I)[B
MethodParameters:
Name Flags
in
bufs
totalLen
private static byte[] combineBuffers(java.util.Deque<byte[]>, );
descriptor: (Ljava/util/Deque;I)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: iload 1
newarray 8
astore 2
start local 2 1: iload 1
istore 3
start local 3 2: goto 8
3: StackMap locals: byte[] int
StackMap stack:
aload 0
invokeinterface java.util.Deque.removeFirst:()Ljava/lang/Object;
checkcast byte[]
astore 4
start local 4 4: iload 3
aload 4
arraylength
invokestatic java.lang.Math.min:(II)I
istore 5
start local 5 5: iload 1
iload 3
isub
istore 6
start local 6 6: aload 4
iconst_0
aload 2
iload 6
iload 5
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
7: iload 3
iload 5
isub
istore 3
end local 6 end local 5 end local 4 8: StackMap locals:
StackMap stack:
iload 3
ifgt 3
9: aload 2
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 bufs Ljava/util/Deque<[B>;
0 10 1 totalLen I
1 10 2 result [B
2 10 3 remaining I
4 8 4 buf [B
5 8 5 bytesToCopy I
6 8 6 resultOffset I
Signature: (Ljava/util/Deque<[B>;I)[B
MethodParameters:
Name Flags
bufs
totalLen
public static byte[] toByteArray(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)[B
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
new java.util.ArrayDeque
dup
bipush 20
invokespecial java.util.ArrayDeque.<init>:(I)V
iconst_0
invokestatic com.google.common.io.ByteStreams.toByteArrayInternal:(Ljava/io/InputStream;Ljava/util/Deque;I)[B
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 in Ljava/io/InputStream;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
static byte[] toByteArray(java.io.InputStream, long);
descriptor: (Ljava/io/InputStream;J)[B
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=7, args_size=2
start local 0 start local 1 0: lload 1
lconst_0
lcmp
iflt 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: ldc "expectedSize (%s) must be non-negative"
lload 1
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;J)V
3: lload 1
ldc 2147483639
lcmp
ifle 5
4: new java.lang.OutOfMemoryError
dup
new java.lang.StringBuilder
dup
lload 1
invokestatic java.lang.String.valueOf:(J)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " bytes is too large to fit in a byte array"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.OutOfMemoryError.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
lload 1
l2i
newarray 8
astore 3
start local 3 6: lload 1
l2i
istore 4
start local 4 7: goto 13
8: StackMap locals: byte[] int
StackMap stack:
lload 1
l2i
iload 4
isub
istore 5
start local 5 9: aload 0
aload 3
iload 5
iload 4
invokevirtual java.io.InputStream.read:([BII)I
istore 6
start local 6 10: iload 6
iconst_m1
if_icmpne 12
11: aload 3
iload 5
invokestatic java.util.Arrays.copyOf:([BI)[B
areturn
12: StackMap locals: int int
StackMap stack:
iload 4
iload 6
isub
istore 4
end local 6 end local 5 13: StackMap locals:
StackMap stack:
iload 4
ifgt 8
14: aload 0
invokevirtual java.io.InputStream.read:()I
istore 5
start local 5 15: iload 5
iconst_m1
if_icmpne 17
16: aload 3
areturn
17: StackMap locals: int
StackMap stack:
new java.util.ArrayDeque
dup
bipush 22
invokespecial java.util.ArrayDeque.<init>:(I)V
astore 6
start local 6 18: aload 6
aload 3
invokeinterface java.util.Deque.add:(Ljava/lang/Object;)Z
pop
19: aload 6
iconst_1
newarray 8
dup
iconst_0
iload 5
i2b
bastore
invokeinterface java.util.Deque.add:(Ljava/lang/Object;)Z
pop
20: aload 0
aload 6
aload 3
arraylength
iconst_1
iadd
invokestatic com.google.common.io.ByteStreams.toByteArrayInternal:(Ljava/io/InputStream;Ljava/util/Deque;I)[B
areturn
end local 6 end local 5 end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 in Ljava/io/InputStream;
0 21 1 expectedSize J
6 21 3 bytes [B
7 21 4 remaining I
9 13 5 off I
10 13 6 read I
15 21 5 b I
18 21 6 bufs Ljava/util/Deque<[B>;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
expectedSize
public static long exhaust(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)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.ByteStreams.createBuffer:()[B
astore 5
start local 5 2: goto 4
start local 3 3: StackMap locals: long long byte[]
StackMap stack:
lload 1
lload 3
ladd
lstore 1
end local 3 4: StackMap locals: java.io.InputStream long top top byte[]
StackMap stack:
aload 0
aload 5
invokevirtual java.io.InputStream.read:([B)I
i2l
dup2
lstore 3
start local 3 5: ldc -1
lcmp
ifne 3
6: lload 1
lreturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 in Ljava/io/InputStream;
1 7 1 total J
3 4 3 read J
5 7 3 read J
2 7 5 buf [B
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
in
public static com.google.common.io.ByteArrayDataInput newDataInput(byte[]);
descriptor: ([B)Lcom/google/common/io/ByteArrayDataInput;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.io.ByteArrayInputStream
dup
aload 0
invokespecial java.io.ByteArrayInputStream.<init>:([B)V
invokestatic com.google.common.io.ByteStreams.newDataInput:(Ljava/io/ByteArrayInputStream;)Lcom/google/common/io/ByteArrayDataInput;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 bytes [B
MethodParameters:
Name Flags
bytes
public static com.google.common.io.ByteArrayDataInput newDataInput(byte[], int);
descriptor: ([BI)Lcom/google/common/io/ByteArrayDataInput;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: iload 1
aload 0
arraylength
invokestatic com.google.common.base.Preconditions.checkPositionIndex:(II)I
pop
1: new java.io.ByteArrayInputStream
dup
aload 0
iload 1
aload 0
arraylength
iload 1
isub
invokespecial java.io.ByteArrayInputStream.<init>:([BII)V
invokestatic com.google.common.io.ByteStreams.newDataInput:(Ljava/io/ByteArrayInputStream;)Lcom/google/common/io/ByteArrayDataInput;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 bytes [B
0 2 1 start I
MethodParameters:
Name Flags
bytes
start
public static com.google.common.io.ByteArrayDataInput newDataInput(java.io.ByteArrayInputStream);
descriptor: (Ljava/io/ByteArrayInputStream;)Lcom/google/common/io/ByteArrayDataInput;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new com.google.common.io.ByteStreams$ByteArrayDataInputStream
dup
aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.io.ByteArrayInputStream
invokespecial com.google.common.io.ByteStreams$ByteArrayDataInputStream.<init>:(Ljava/io/ByteArrayInputStream;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 byteArrayInputStream Ljava/io/ByteArrayInputStream;
MethodParameters:
Name Flags
byteArrayInputStream
public static com.google.common.io.ByteArrayDataOutput newDataOutput();
descriptor: ()Lcom/google/common/io/ByteArrayDataOutput;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
invokestatic com.google.common.io.ByteStreams.newDataOutput:(Ljava/io/ByteArrayOutputStream;)Lcom/google/common/io/ByteArrayDataOutput;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static com.google.common.io.ByteArrayDataOutput newDataOutput(int);
descriptor: (I)Lcom/google/common/io/ByteArrayDataOutput;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: iload 0
ifge 2
1: new java.lang.IllegalArgumentException
dup
ldc "Invalid size: %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
iload 0
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
2: StackMap locals:
StackMap stack:
new java.io.ByteArrayOutputStream
dup
iload 0
invokespecial java.io.ByteArrayOutputStream.<init>:(I)V
invokestatic com.google.common.io.ByteStreams.newDataOutput:(Ljava/io/ByteArrayOutputStream;)Lcom/google/common/io/ByteArrayDataOutput;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 size I
MethodParameters:
Name Flags
size
public static com.google.common.io.ByteArrayDataOutput newDataOutput(java.io.ByteArrayOutputStream);
descriptor: (Ljava/io/ByteArrayOutputStream;)Lcom/google/common/io/ByteArrayDataOutput;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new com.google.common.io.ByteStreams$ByteArrayDataOutputStream
dup
aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.io.ByteArrayOutputStream
invokespecial com.google.common.io.ByteStreams$ByteArrayDataOutputStream.<init>:(Ljava/io/ByteArrayOutputStream;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 byteArrayOutputSteam Ljava/io/ByteArrayOutputStream;
MethodParameters:
Name Flags
byteArrayOutputSteam
public static java.io.OutputStream nullOutputStream();
descriptor: ()Ljava/io/OutputStream;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic com.google.common.io.ByteStreams.NULL_OUTPUT_STREAM:Ljava/io/OutputStream;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static java.io.InputStream limit(java.io.InputStream, long);
descriptor: (Ljava/io/InputStream;J)Ljava/io/InputStream;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: new com.google.common.io.ByteStreams$LimitedInputStream
dup
aload 0
lload 1
invokespecial com.google.common.io.ByteStreams$LimitedInputStream.<init>:(Ljava/io/InputStream;J)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 in Ljava/io/InputStream;
0 1 1 limit J
MethodParameters:
Name Flags
in
limit
public static void readFully(java.io.InputStream, byte[]);
descriptor: (Ljava/io/InputStream;[B)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_0
aload 1
arraylength
invokestatic com.google.common.io.ByteStreams.readFully:(Ljava/io/InputStream;[BII)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 in Ljava/io/InputStream;
0 2 1 b [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
b
public static void readFully(java.io.InputStream, byte[], int, int);
descriptor: (Ljava/io/InputStream;[BII)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
iload 2
iload 3
invokestatic com.google.common.io.ByteStreams.read:(Ljava/io/InputStream;[BII)I
istore 4
start local 4 1: iload 4
iload 3
if_icmpeq 5
2: new java.io.EOFException
dup
3: new java.lang.StringBuilder
dup
ldc "reached end of stream after reading "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bytes; "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 3
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bytes expected"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: int
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 in Ljava/io/InputStream;
0 6 1 b [B
0 6 2 off I
0 6 3 len I
1 6 4 read I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
b
off
len
public static void skipFully(java.io.InputStream, long);
descriptor: (Ljava/io/InputStream;J)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: aload 0
lload 1
invokestatic com.google.common.io.ByteStreams.skipUpTo:(Ljava/io/InputStream;J)J
lstore 3
start local 3 1: lload 3
lload 1
lcmp
ifge 5
2: new java.io.EOFException
dup
3: new java.lang.StringBuilder
dup
ldc "reached end of stream after skipping "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 3
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " bytes; "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
lload 1
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " bytes expected"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: long
StackMap stack:
return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 in Ljava/io/InputStream;
0 6 1 n J
1 6 3 skipped J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
n
static long skipUpTo(java.io.InputStream, long);
descriptor: (Ljava/io/InputStream;J)J
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=11, args_size=2
start local 0 start local 1 0: lconst_0
lstore 3
start local 3 1: invokestatic com.google.common.io.ByteStreams.createBuffer:()[B
astore 5
start local 5 2: goto 10
3: StackMap locals: long byte[]
StackMap stack:
lload 1
lload 3
lsub
lstore 6
start local 6 4: aload 0
lload 6
invokestatic com.google.common.io.ByteStreams.skipSafely:(Ljava/io/InputStream;J)J
lstore 8
start local 8 5: lload 8
lconst_0
lcmp
ifne 9
6: lload 6
aload 5
arraylength
i2l
invokestatic java.lang.Math.min:(JJ)J
l2i
istore 10
start local 10 7: aload 0
aload 5
iconst_0
iload 10
invokevirtual java.io.InputStream.read:([BII)I
i2l
dup2
lstore 8
ldc -1
lcmp
ifne 9
8: goto 11
end local 10 9: StackMap locals: long long
StackMap stack:
lload 3
lload 8
ladd
lstore 3
end local 8 end local 6 10: StackMap locals:
StackMap stack:
lload 3
lload 1
lcmp
iflt 3
11: StackMap locals:
StackMap stack:
lload 3
lreturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 in Ljava/io/InputStream;
0 12 1 n J
1 12 3 totalSkipped J
2 12 5 buf [B
4 10 6 remaining J
5 10 8 skipped J
7 9 10 skip I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
n final
private static long skipSafely(java.io.InputStream, long);
descriptor: (Ljava/io/InputStream;J)J
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.io.InputStream.available:()I
istore 3
start local 3 1: iload 3
ifne 2
lconst_0
goto 3
StackMap locals: int
StackMap stack:
2: aload 0
iload 3
i2l
lload 1
invokestatic java.lang.Math.min:(JJ)J
invokevirtual java.io.InputStream.skip:(J)J
StackMap locals:
StackMap stack: long
3: lreturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 in Ljava/io/InputStream;
0 4 1 n J
1 4 3 available I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
n
public static <T> T readBytes(java.io.InputStream, com.google.common.io.ByteProcessor<T>);
descriptor: (Ljava/io/InputStream;Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, 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: invokestatic com.google.common.io.ByteStreams.createBuffer:()[B
astore 2
start local 2 3: StackMap locals: byte[]
StackMap stack:
aload 0
aload 2
invokevirtual java.io.InputStream.read:([B)I
istore 3
start local 3 4: iload 3
iconst_m1
if_icmpeq 5
aload 1
aload 2
iconst_0
iload 3
invokeinterface com.google.common.io.ByteProcessor.processBytes:([BII)Z
ifne 3
5: StackMap locals: int
StackMap stack:
aload 1
invokeinterface com.google.common.io.ByteProcessor.getResult:()Ljava/lang/Object;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 input Ljava/io/InputStream;
0 6 1 processor Lcom/google/common/io/ByteProcessor<TT;>;
3 6 2 buf [B
4 6 3 read I
Exceptions:
throws java.io.IOException
Signature: <T:Ljava/lang/Object;>(Ljava/io/InputStream;Lcom/google/common/io/ByteProcessor<TT;>;)TT;
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
input
processor
public static int read(java.io.InputStream, byte[], int, int);
descriptor: (Ljava/io/InputStream;[BII)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 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: iload 3
ifge 4
3: new java.lang.IndexOutOfBoundsException
dup
ldc "len is negative"
invokespecial java.lang.IndexOutOfBoundsException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
iconst_0
istore 4
start local 4 5: goto 10
6: StackMap locals: int
StackMap stack:
aload 0
aload 1
iload 2
iload 4
iadd
iload 3
iload 4
isub
invokevirtual java.io.InputStream.read:([BII)I
istore 5
start local 5 7: iload 5
iconst_m1
if_icmpne 9
8: goto 11
9: StackMap locals: int
StackMap stack:
iload 4
iload 5
iadd
istore 4
end local 5 10: StackMap locals:
StackMap stack:
iload 4
iload 3
if_icmplt 6
11: StackMap locals:
StackMap stack:
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 12 0 in Ljava/io/InputStream;
0 12 1 b [B
0 12 2 off I
0 12 3 len I
5 12 4 total I
7 10 5 result I
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.google.errorprone.annotations.CanIgnoreReturnValue()
MethodParameters:
Name Flags
in
b
off
len
}
SourceFile: "ByteStreams.java"
NestMembers:
com.google.common.io.ByteStreams$1 com.google.common.io.ByteStreams$ByteArrayDataInputStream com.google.common.io.ByteStreams$ByteArrayDataOutputStream com.google.common.io.ByteStreams$LimitedInputStream
InnerClasses:
com.google.common.io.ByteStreams$1
private ByteArrayDataInputStream = com.google.common.io.ByteStreams$ByteArrayDataInputStream of com.google.common.io.ByteStreams
private ByteArrayDataOutputStream = com.google.common.io.ByteStreams$ByteArrayDataOutputStream of com.google.common.io.ByteStreams
private final LimitedInputStream = com.google.common.io.ByteStreams$LimitedInputStream of com.google.common.io.ByteStreams
RuntimeInvisibleAnnotations:
com.google.common.annotations.Beta()
com.google.common.annotations.GwtIncompatible()