class com.mongodb.client.gridfs.GridFSDownloadStreamImpl extends com.mongodb.client.gridfs.GridFSDownloadStream
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.mongodb.client.gridfs.GridFSDownloadStreamImpl
super_class: com.mongodb.client.gridfs.GridFSDownloadStream
{
private final com.mongodb.client.ClientSession clientSession;
descriptor: Lcom/mongodb/client/ClientSession;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.client.gridfs.model.GridFSFile fileInfo;
descriptor: Lcom/mongodb/client/gridfs/model/GridFSFile;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.client.MongoCollection<org.bson.Document> chunksCollection;
descriptor: Lcom/mongodb/client/MongoCollection;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lcom/mongodb/client/MongoCollection<Lorg/bson/Document;>;
private final org.bson.BsonValue fileId;
descriptor: Lorg/bson/BsonValue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final long length;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int chunkSizeInBytes;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int numberOfChunks;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private com.mongodb.client.MongoCursor<org.bson.Document> cursor;
descriptor: Lcom/mongodb/client/MongoCursor;
flags: (0x0002) ACC_PRIVATE
Signature: Lcom/mongodb/client/MongoCursor<Lorg/bson/Document;>;
private int batchSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int chunkIndex;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int bufferOffset;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long currentPosition;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private byte[] buffer;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private long markPosition;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private final java.lang.Object closeLock;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Object cursorLock;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean closed;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
void <init>(com.mongodb.client.ClientSession, com.mongodb.client.gridfs.model.GridFSFile, com.mongodb.client.MongoCollection<org.bson.Document>);
descriptor: (Lcom/mongodb/client/ClientSession;Lcom/mongodb/client/gridfs/model/GridFSFile;Lcom/mongodb/client/MongoCollection;)V
flags: (0x0000)
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial com.mongodb.client.gridfs.GridFSDownloadStream.<init>:()V
1: aload 0
aconst_null
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
2: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closeLock:Ljava/lang/Object;
3: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursorLock:Ljava/lang/Object;
4: aload 0
iconst_0
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closed:Z
5: aload 0
aload 1
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
6: aload 0
ldc "file information"
aload 2
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.client.gridfs.model.GridFSFile
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileInfo:Lcom/mongodb/client/gridfs/model/GridFSFile;
7: aload 0
ldc "chunks collection"
aload 3
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.client.MongoCollection
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
8: aload 0
aload 2
invokevirtual com.mongodb.client.gridfs.model.GridFSFile.getId:()Lorg/bson/BsonValue;
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileId:Lorg/bson/BsonValue;
9: aload 0
aload 2
invokevirtual com.mongodb.client.gridfs.model.GridFSFile.getLength:()J
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
10: aload 0
aload 2
invokevirtual com.mongodb.client.gridfs.model.GridFSFile.getChunkSize:()I
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
11: aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
l2d
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2d
ddiv
invokestatic java.lang.Math.ceil:(D)D
d2i
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.numberOfChunks:I
12: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 13 1 clientSession Lcom/mongodb/client/ClientSession;
0 13 2 fileInfo Lcom/mongodb/client/gridfs/model/GridFSFile;
0 13 3 chunksCollection Lcom/mongodb/client/MongoCollection<Lorg/bson/Document;>;
Signature: (Lcom/mongodb/client/ClientSession;Lcom/mongodb/client/gridfs/model/GridFSFile;Lcom/mongodb/client/MongoCollection<Lorg/bson/Document;>;)V
RuntimeVisibleParameterAnnotations:
0:
com.mongodb.lang.Nullable()
1:
2:
MethodParameters:
Name Flags
clientSession final
fileInfo final
chunksCollection final
public com.mongodb.client.gridfs.model.GridFSFile getGridFSFile();
descriptor: ()Lcom/mongodb/client/gridfs/model/GridFSFile;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileInfo:Lcom/mongodb/client/gridfs/model/GridFSFile;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
public com.mongodb.client.gridfs.GridFSDownloadStream batchSize(int);
descriptor: (I)Lcom/mongodb/client/gridfs/GridFSDownloadStream;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: ldc "batchSize cannot be negative"
iload 1
iflt 1
iconst_1
goto 2
StackMap locals:
StackMap stack: java.lang.String
1: iconst_0
StackMap locals: com.mongodb.client.gridfs.GridFSDownloadStreamImpl int
StackMap stack: java.lang.String int
2: invokestatic com.mongodb.assertions.Assertions.isTrueArgument:(Ljava/lang/String;Z)V
3: aload 0
iload 1
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.batchSize:I
4: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.discardCursor:()V
5: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 6 1 batchSize I
MethodParameters:
Name Flags
batchSize final
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: iconst_1
newarray 8
astore 1
start local 1 1: aload 0
aload 1
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.read:([B)I
istore 2
start local 2 2: iload 2
ifge 4
3: iconst_m1
ireturn
4: StackMap locals: byte[] int
StackMap stack:
aload 1
iconst_0
baload
sipush 255
iand
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
1 5 1 b [B
2 5 2 res I
public int read(byte[]);
descriptor: ([B)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_0
aload 1
arraylength
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.read:([BII)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 1 1 b [B
MethodParameters:
Name Flags
b final
public int read(byte[], int, int);
descriptor: ([BII)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.checkClosed:()V
1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
lcmp
ifne 3
2: iconst_m1
ireturn
3: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
ifnonnull 6
4: aload 0
aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.getBuffer:(I)[B
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
5: goto 10
StackMap locals:
StackMap stack:
6: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
arraylength
if_icmpne 10
7: aload 0
dup
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
iconst_1
iadd
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
8: aload 0
aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.getBuffer:(I)[B
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
9: aload 0
iconst_0
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
10: StackMap locals:
StackMap stack:
iload 3
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
arraylength
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
isub
invokestatic java.lang.Math.min:(II)I
istore 4
start local 4 11: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
aload 1
iload 2
iload 4
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
12: aload 0
dup
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
iload 4
iadd
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
13: aload 0
dup
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
iload 4
i2l
ladd
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
14: 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 15 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 15 1 b [B
0 15 2 off I
0 15 3 len I
11 15 4 r I
MethodParameters:
Name Flags
b final
off final
len final
public long skip(long);
descriptor: (J)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.checkClosed:()V
1: lload 1
lconst_0
lcmp
ifgt 3
2: lconst_0
lreturn
3: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
lload 1
ladd
lstore 3
start local 3 4: aload 0
lload 3
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2l
lrem
l2i
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
5: lload 3
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
lcmp
iflt 12
6: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
lsub
lstore 5
start local 5 7: aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.numberOfChunks:I
iconst_1
isub
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
8: aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
9: aload 0
aconst_null
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
10: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.discardCursor:()V
11: lload 5
lreturn
end local 5 12: StackMap locals: long
StackMap stack:
lload 3
l2d
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2d
ddiv
invokestatic java.lang.Math.floor:(D)D
d2i
istore 5
start local 5 13: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
iload 5
if_icmpeq 17
14: aload 0
iload 5
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
15: aload 0
aconst_null
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
16: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.discardCursor:()V
17: StackMap locals: int
StackMap stack:
aload 0
dup
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
lload 1
ladd
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
18: lload 1
lreturn
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 19 1 bytesToSkip J
4 19 3 skippedPosition J
7 12 5 skipped J
13 19 5 newChunkIndex I
MethodParameters:
Name Flags
bytesToSkip final
public int available();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.checkClosed:()V
1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
ifnonnull 3
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
arraylength
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
isub
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
public void mark();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc 2147483647
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.mark:(I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
public synchronized void mark(int);
descriptor: (I)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.markPosition:J
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 2 1 readlimit I
MethodParameters:
Name Flags
readlimit final
public synchronized void reset();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.checkClosed:()V
1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.markPosition:J
lcmp
ifne 3
2: return
3: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.markPosition:J
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2l
lrem
l2i
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.bufferOffset:I
4: aload 0
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.markPosition:J
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.currentPosition:J
5: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.markPosition:J
l2d
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2d
ddiv
invokestatic java.lang.Math.floor:(D)D
d2i
istore 1
start local 1 6: iload 1
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
if_icmpeq 10
7: aload 0
iload 1
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkIndex:I
8: aload 0
aconst_null
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.buffer:[B
9: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.discardCursor:()V
10: StackMap locals: int
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
6 11 1 markChunkIndex I
public boolean markSupported();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closeLock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closed:Z
ifne 3
2: aload 0
iconst_1
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closed:Z
3: StackMap locals: java.lang.Object
StackMap stack:
aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.discardCursor:()V
4: aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
Exception table:
from to target type
1 5 6 any
6 7 6 any
private void checkClosed();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closeLock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.closed:Z
ifeq 3
2: new com.mongodb.MongoGridFSException
dup
ldc "The InputStream has been closed"
invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.lang.Object
StackMap stack:
aload 1
monitorexit
4: goto 7
StackMap locals:
StackMap stack: java.lang.Throwable
5: aload 1
monitorexit
6: athrow
7: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
Exception table:
from to target type
1 4 5 any
5 6 5 any
private void discardCursor();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursorLock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
ifnull 4
2: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
invokeinterface com.mongodb.client.MongoCursor.close:()V
3: aload 0
aconst_null
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
4: StackMap locals: java.lang.Object
StackMap stack:
aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
Exception table:
from to target type
1 5 6 any
6 7 6 any
private org.bson.Document getChunk(int);
descriptor: (I)Lorg/bson/Document;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
ifnonnull 2
1: aload 0
aload 0
iload 1
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.getCursor:(I)Lcom/mongodb/client/MongoCursor;
putfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
2: StackMap locals:
StackMap stack:
aconst_null
astore 2
start local 2 3: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
invokeinterface com.mongodb.client.MongoCursor.hasNext:()Z
ifeq 11
4: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.cursor:Lcom/mongodb/client/MongoCursor;
invokeinterface com.mongodb.client.MongoCursor.next:()Ljava/lang/Object;
checkcast org.bson.Document
astore 2
5: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.batchSize:I
iconst_1
if_icmpne 7
6: aload 0
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.discardCursor:()V
7: StackMap locals: org.bson.Document
StackMap stack:
aload 2
ldc "n"
invokevirtual org.bson.Document.getInteger:(Ljava/lang/Object;)Ljava/lang/Integer;
invokevirtual java.lang.Integer.intValue:()I
iload 1
if_icmpeq 11
8: new com.mongodb.MongoGridFSException
dup
ldc "Could not find file chunk for file_id: %s at chunk index %s."
iconst_2
anewarray java.lang.Object
dup
iconst_0
9: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileId:Lorg/bson/BsonValue;
aastore
dup
iconst_1
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
10: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 12 1 startChunkIndex I
3 12 2 chunk Lorg/bson/Document;
RuntimeVisibleAnnotations:
com.mongodb.lang.Nullable()
MethodParameters:
Name Flags
startChunkIndex final
private com.mongodb.client.MongoCursor<org.bson.Document> getCursor(int);
descriptor: (I)Lcom/mongodb/client/MongoCursor;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=2
start local 0 start local 1 0: new org.bson.Document
dup
ldc "files_id"
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileId:Lorg/bson/BsonValue;
invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
ldc "n"
new org.bson.Document
dup
ldc "$gte"
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
invokevirtual org.bson.Document.append:(Ljava/lang/String;Ljava/lang/Object;)Lorg/bson/Document;
astore 3
start local 3 1: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
ifnull 4
2: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
aload 3
invokeinterface com.mongodb.client.MongoCollection.find:(Lcom/mongodb/client/ClientSession;Lorg/bson/conversions/Bson;)Lcom/mongodb/client/FindIterable;
astore 2
start local 2 3: goto 5
end local 2 4: StackMap locals: com.mongodb.client.gridfs.GridFSDownloadStreamImpl int top org.bson.Document
StackMap stack:
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
aload 3
invokeinterface com.mongodb.client.MongoCollection.find:(Lorg/bson/conversions/Bson;)Lcom/mongodb/client/FindIterable;
astore 2
start local 2 5: StackMap locals: com.mongodb.client.gridfs.GridFSDownloadStreamImpl int com.mongodb.client.FindIterable org.bson.Document
StackMap stack:
aload 2
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.batchSize:I
invokeinterface com.mongodb.client.FindIterable.batchSize:(I)Lcom/mongodb/client/FindIterable;
new org.bson.Document
dup
ldc "n"
iconst_1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
invokeinterface com.mongodb.client.FindIterable.sort:(Lorg/bson/conversions/Bson;)Lcom/mongodb/client/FindIterable;
invokeinterface com.mongodb.client.FindIterable.iterator:()Lcom/mongodb/client/MongoCursor;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 6 1 startChunkIndex I
3 4 2 findIterable Lcom/mongodb/client/FindIterable<Lorg/bson/Document;>;
5 6 2 findIterable Lcom/mongodb/client/FindIterable<Lorg/bson/Document;>;
1 6 3 filter Lorg/bson/Document;
Signature: (I)Lcom/mongodb/client/MongoCursor<Lorg/bson/Document;>;
MethodParameters:
Name Flags
startChunkIndex final
private byte[] getBufferFromChunk(org.bson.Document, int);
descriptor: (Lorg/bson/Document;I)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnull 1
aload 1
ldc "n"
invokevirtual org.bson.Document.getInteger:(Ljava/lang/Object;)Ljava/lang/Integer;
invokevirtual java.lang.Integer.intValue:()I
iload 2
if_icmpeq 4
1: StackMap locals:
StackMap stack:
new com.mongodb.MongoGridFSException
dup
ldc "Could not find file chunk for file_id: %s at chunk index %s."
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileId:Lorg/bson/BsonValue;
aastore
dup
iconst_1
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 1
ldc "data"
invokevirtual org.bson.Document.get:(Ljava/lang/Object;)Ljava/lang/Object;
instanceof org.bson.types.Binary
ifne 6
5: new com.mongodb.MongoGridFSException
dup
ldc "Unexpected data format for the chunk"
invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 1
ldc "data"
ldc Lorg/bson/types/Binary;
invokevirtual org.bson.Document.get:(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
checkcast org.bson.types.Binary
invokevirtual org.bson.types.Binary.getData:()[B
astore 3
start local 3 7: lconst_0
lstore 4
start local 4 8: iconst_0
istore 6
start local 6 9: iload 2
iconst_1
iadd
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.numberOfChunks:I
if_icmple 12
10: iconst_1
istore 6
11: goto 16
StackMap locals: byte[] long int
StackMap stack:
12: iload 2
iconst_1
iadd
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.numberOfChunks:I
if_icmpne 15
13: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.length:J
iload 2
i2l
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2l
lmul
lsub
lstore 4
14: goto 16
15: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.chunkSizeInBytes:I
i2l
lstore 4
16: StackMap locals:
StackMap stack:
iload 6
ifeq 20
aload 3
arraylength
i2l
lload 4
lcmp
ifle 20
17: new com.mongodb.MongoGridFSException
dup
ldc "Extra chunk data for file_id: %s. Unexpected chunk at chunk index %s.The size was %s and it should be %s bytes."
iconst_4
anewarray java.lang.Object
dup
iconst_0
18: aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileId:Lorg/bson/BsonValue;
aastore
dup
iconst_1
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
aload 3
arraylength
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_3
lload 4
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
19: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
athrow
20: StackMap locals:
StackMap stack:
aload 3
arraylength
i2l
lload 4
lcmp
ifeq 24
21: new com.mongodb.MongoGridFSException
dup
ldc "Chunk size data length is not the expected size. The size was %s for file_id: %s chunk index %s it should be %s bytes."
iconst_4
anewarray java.lang.Object
dup
iconst_0
22: aload 3
arraylength
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 0
getfield com.mongodb.client.gridfs.GridFSDownloadStreamImpl.fileId:Lorg/bson/BsonValue;
aastore
dup
iconst_2
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_3
lload 4
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
23: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
athrow
24: StackMap locals:
StackMap stack:
aload 3
areturn
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 25 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 25 1 chunk Lorg/bson/Document;
0 25 2 expectedChunkIndex I
7 25 3 data [B
8 25 4 expectedDataLength J
9 25 6 extraChunk Z
RuntimeVisibleParameterAnnotations:
0:
com.mongodb.lang.Nullable()
1:
MethodParameters:
Name Flags
chunk final
expectedChunkIndex final
private byte[] getBuffer(int);
descriptor: (I)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 0
iload 1
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.getChunk:(I)Lorg/bson/Document;
iload 1
invokevirtual com.mongodb.client.gridfs.GridFSDownloadStreamImpl.getBufferFromChunk:(Lorg/bson/Document;I)[B
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/client/gridfs/GridFSDownloadStreamImpl;
0 1 1 chunkIndexToFetch I
MethodParameters:
Name Flags
chunkIndexToFetch final
}
SourceFile: "GridFSDownloadStreamImpl.java"