public class org.apache.cassandra.streaming.compress.CompressedInputStream extends java.io.InputStream
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.streaming.compress.CompressedInputStream
super_class: java.io.InputStream
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final org.apache.cassandra.streaming.compress.CompressionInfo info;
descriptor: Lorg/apache/cassandra/streaming/compress/CompressionInfo;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.BlockingQueue<byte[]> dataBuffer;
descriptor: Ljava/util/concurrent/BlockingQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/BlockingQueue<[B>;
private final java.util.function.Supplier<java.lang.Double> crcCheckChanceSupplier;
descriptor: Ljava/util/function/Supplier;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Supplier<Ljava/lang/Double;>;
private final byte[] buffer;
descriptor: [B
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
protected long bufferOffset;
descriptor: J
flags: (0x0004) ACC_PROTECTED
private long current;
descriptor: J
flags: (0x0002) ACC_PRIVATE
protected int validBufferBytes;
descriptor: I
flags: (0x0004) ACC_PROTECTED
private final org.apache.cassandra.utils.ChecksumType checksumType;
descriptor: Lorg/apache/cassandra/utils/ChecksumType;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final byte[] checksumBytes;
descriptor: [B
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static final byte[] POISON_PILL;
descriptor: [B
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
protected volatile java.io.IOException readException;
descriptor: Ljava/io/IOException;
flags: (0x0044) ACC_PROTECTED, ACC_VOLATILE
private long totalCompressedBytesRead;
descriptor: J
flags: (0x0002) ACC_PRIVATE
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.streaming.compress.CompressedInputStream.$assertionsDisabled:Z
3: ldc Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.streaming.compress.CompressedInputStream.logger:Lorg/slf4j/Logger;
4: iconst_0
newarray 8
putstatic org.apache.cassandra.streaming.compress.CompressedInputStream.POISON_PILL:[B
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.io.InputStream, org.apache.cassandra.streaming.compress.CompressionInfo, org.apache.cassandra.utils.ChecksumType, java.util.function.Supplier<java.lang.Double>);
descriptor: (Ljava/io/InputStream;Lorg/apache/cassandra/streaming/compress/CompressionInfo;Lorg/apache/cassandra/utils/ChecksumType;Ljava/util/function/Supplier;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial java.io.InputStream.<init>:()V
1: aload 0
lconst_0
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
2: aload 0
lconst_0
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
3: aload 0
iconst_m1
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.validBufferBytes:I
4: aload 0
iconst_4
newarray 8
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
5: aload 0
aconst_null
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.readException:Ljava/io/IOException;
6: aload 0
aload 2
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.info:Lorg/apache/cassandra/streaming/compress/CompressionInfo;
7: aload 0
aload 2
getfield org.apache.cassandra.streaming.compress.CompressionInfo.parameters:Lorg/apache/cassandra/schema/CompressionParams;
invokevirtual org.apache.cassandra.schema.CompressionParams.chunkLength:()I
newarray 8
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
8: aload 0
new java.util.concurrent.ArrayBlockingQueue
dup
aload 2
getfield org.apache.cassandra.streaming.compress.CompressionInfo.chunks:[Lorg/apache/cassandra/io/compress/CompressionMetadata$Chunk;
arraylength
sipush 1024
invokestatic java.lang.Math.min:(II)I
invokespecial java.util.concurrent.ArrayBlockingQueue.<init>:(I)V
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.dataBuffer:Ljava/util/concurrent/BlockingQueue;
9: aload 0
aload 4
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.crcCheckChanceSupplier:Ljava/util/function/Supplier;
10: aload 0
aload 3
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumType:Lorg/apache/cassandra/utils/ChecksumType;
11: new io.netty.util.concurrent.FastThreadLocalThread
dup
new org.apache.cassandra.streaming.compress.CompressedInputStream$Reader
dup
aload 0
aload 1
aload 2
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.dataBuffer:Ljava/util/concurrent/BlockingQueue;
invokespecial org.apache.cassandra.streaming.compress.CompressedInputStream$Reader.<init>:(Lorg/apache/cassandra/streaming/compress/CompressedInputStream;Ljava/io/InputStream;Lorg/apache/cassandra/streaming/compress/CompressionInfo;Ljava/util/concurrent/BlockingQueue;)V
invokespecial io.netty.util.concurrent.FastThreadLocalThread.<init>:(Ljava/lang/Runnable;)V
invokevirtual io.netty.util.concurrent.FastThreadLocalThread.start:()V
12: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
0 13 1 source Ljava/io/InputStream;
0 13 2 info Lorg/apache/cassandra/streaming/compress/CompressionInfo;
0 13 3 checksumType Lorg/apache/cassandra/utils/ChecksumType;
0 13 4 crcCheckChanceSupplier Ljava/util/function/Supplier<Ljava/lang/Double;>;
Signature: (Ljava/io/InputStream;Lorg/apache/cassandra/streaming/compress/CompressionInfo;Lorg/apache/cassandra/utils/ChecksumType;Ljava/util/function/Supplier<Ljava/lang/Double;>;)V
MethodParameters:
Name Flags
source
info
checksumType
crcCheckChanceSupplier
private void decompressNextChunk();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.readException:Ljava/io/IOException;
ifnull 2
1: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.readException:Ljava/io/IOException;
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.dataBuffer:Ljava/util/concurrent/BlockingQueue;
invokeinterface java.util.concurrent.BlockingQueue.take:()Ljava/lang/Object;
checkcast byte[]
astore 1
start local 1 3: aload 1
getstatic org.apache.cassandra.streaming.compress.CompressedInputStream.POISON_PILL:[B
if_acmpne 6
4: getstatic org.apache.cassandra.streaming.compress.CompressedInputStream.$assertionsDisabled:Z
ifne 5
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.readException:Ljava/io/IOException;
ifnonnull 5
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
5: StackMap locals: byte[]
StackMap stack:
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.readException:Ljava/io/IOException;
athrow
6: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.apache.cassandra.streaming.compress.CompressedInputStream.decompress:([B)V
end local 1 7: goto 10
8: StackMap locals: org.apache.cassandra.streaming.compress.CompressedInputStream
StackMap stack: java.lang.InterruptedException
pop
9: new java.io.EOFException
dup
ldc "No chunk available"
invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
3 7 1 compressedWithCRC [B
Exception table:
from to target type
2 7 8 Class java.lang.InterruptedException
Exceptions:
throws java.io.IOException
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
arraylength
i2l
ladd
lcmp
ifge 1
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.validBufferBytes:I
iconst_m1
if_icmpne 2
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.apache.cassandra.streaming.compress.CompressedInputStream.decompressNextChunk:()V
2: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.streaming.compress.CompressedInputStream.$assertionsDisabled:Z
ifne 4
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
lcmp
iflt 3
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.validBufferBytes:I
i2l
ladd
lcmp
iflt 4
StackMap locals:
StackMap stack:
3: new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
aload 0
dup
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
dup2_x1
lconst_1
ladd
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
lsub
l2i
baload
sipush 255
iand
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
Exceptions:
throws java.io.IOException
public int read(byte[], int, int);
descriptor: ([BII)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
iload 3
i2l
ladd
lstore 4
start local 4 1: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
arraylength
i2l
ladd
lcmp
ifge 2
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.validBufferBytes:I
iconst_m1
if_icmpne 3
2: StackMap locals: long
StackMap stack:
aload 0
invokevirtual org.apache.cassandra.streaming.compress.CompressedInputStream.decompressNextChunk:()V
3: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.streaming.compress.CompressedInputStream.$assertionsDisabled:Z
ifne 4
lload 4
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
lcmp
ifge 4
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
4: StackMap locals:
StackMap stack:
iconst_0
istore 6
start local 6 5: goto 12
6: StackMap locals: int
StackMap stack:
iload 3
iload 6
isub
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.validBufferBytes:I
i2l
ladd
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
lsub
l2i
invokestatic java.lang.Math.min:(II)I
istore 7
start local 7 7: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
lsub
l2i
aload 1
iload 2
iload 6
iadd
iload 7
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: iload 6
iload 7
iadd
istore 6
9: aload 0
dup
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
iload 7
i2l
ladd
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
10: iload 6
iload 3
if_icmpeq 12
11: aload 0
invokevirtual org.apache.cassandra.streaming.compress.CompressedInputStream.decompressNextChunk:()V
end local 7 12: StackMap locals:
StackMap stack:
iload 6
iload 3
if_icmplt 6
13: iload 3
ireturn
end local 6 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
0 14 1 b [B
0 14 2 off I
0 14 3 len I
1 14 4 nextCurrent J
5 14 6 read I
7 12 7 nextLen I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
public void position(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.streaming.compress.CompressedInputStream.$assertionsDisabled:Z
ifne 1
lload 1
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
lcmp
ifge 1
new java.lang.AssertionError
dup
ldc "stream can only read forward."
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
1: StackMap locals:
StackMap stack:
aload 0
lload 1
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
0 3 1 position J
MethodParameters:
Name Flags
position
private void decompress(byte[]);
descriptor: ([B)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.info:Lorg/apache/cassandra/streaming/compress/CompressionInfo;
getfield org.apache.cassandra.streaming.compress.CompressionInfo.parameters:Lorg/apache/cassandra/schema/CompressionParams;
invokevirtual org.apache.cassandra.schema.CompressionParams.getSstableCompressor:()Lorg/apache/cassandra/io/compress/ICompressor;
aload 1
iconst_0
aload 1
arraylength
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
arraylength
isub
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
iconst_0
invokeinterface org.apache.cassandra.io.compress.ICompressor.uncompress:([BII[BI)I
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.validBufferBytes:I
1: aload 0
dup
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.totalCompressedBytesRead:J
aload 1
arraylength
i2l
ladd
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.totalCompressedBytesRead:J
2: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.crcCheckChanceSupplier:Ljava/util/function/Supplier;
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast java.lang.Double
invokevirtual java.lang.Double.doubleValue:()D
dconst_1
dcmpl
ifge 4
3: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.crcCheckChanceSupplier:Ljava/util/function/Supplier;
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast java.lang.Double
invokevirtual java.lang.Double.doubleValue:()D
invokestatic java.util.concurrent.ThreadLocalRandom.current:()Ljava/util/concurrent/ThreadLocalRandom;
invokevirtual java.util.concurrent.ThreadLocalRandom.nextDouble:()D
dcmpl
ifle 8
4: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumType:Lorg/apache/cassandra/utils/ChecksumType;
aload 1
iconst_0
aload 1
arraylength
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
arraylength
isub
invokevirtual org.apache.cassandra.utils.ChecksumType.of:([BII)J
l2i
istore 2
start local 2 5: aload 1
aload 1
arraylength
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
arraylength
isub
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
iconst_0
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
6: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.checksumBytes:[B
invokestatic com.google.common.primitives.Ints.fromByteArray:([B)I
iload 2
if_icmpeq 8
7: new java.io.IOException
dup
ldc "CRC unmatched"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 2 8: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.current:J
aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.buffer:[B
arraylength
iconst_1
isub
iconst_m1
ixor
i2l
land
putfield org.apache.cassandra.streaming.compress.CompressedInputStream.bufferOffset:J
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
0 10 1 compressed [B
5 8 2 checksum I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
compressed
public long getTotalCompressedBytesRead();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.streaming.compress.CompressedInputStream.totalCompressedBytesRead:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/streaming/compress/CompressedInputStream;
}
SourceFile: "CompressedInputStream.java"
NestMembers:
org.apache.cassandra.streaming.compress.CompressedInputStream$Reader
InnerClasses:
Reader = org.apache.cassandra.streaming.compress.CompressedInputStream$Reader of org.apache.cassandra.streaming.compress.CompressedInputStream