final class com.mongodb.client.gridfs.GridFSUploadStreamImpl extends com.mongodb.client.gridfs.GridFSUploadStream
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: com.mongodb.client.gridfs.GridFSUploadStreamImpl
  super_class: com.mongodb.client.gridfs.GridFSUploadStream
{
  private final com.mongodb.client.ClientSession clientSession;
    descriptor: Lcom/mongodb/client/ClientSession;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final com.mongodb.client.MongoCollection<com.mongodb.client.gridfs.model.GridFSFile> filesCollection;
    descriptor: Lcom/mongodb/client/MongoCollection;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Lcom/mongodb/client/MongoCollection<Lcom/mongodb/client/gridfs/model/GridFSFile;>;

  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 java.lang.String filename;
    descriptor: Ljava/lang/String;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final int chunkSizeBytes;
    descriptor: I
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final org.bson.Document metadata;
    descriptor: Lorg/bson/Document;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.security.MessageDigest md5;
    descriptor: Ljava/security/MessageDigest;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private byte[] buffer;
    descriptor: [B
    flags: (0x0002) ACC_PRIVATE

  private long lengthInBytes;
    descriptor: J
    flags: (0x0002) ACC_PRIVATE

  private int bufferOffset;
    descriptor: I
    flags: (0x0002) ACC_PRIVATE

  private int chunkIndex;
    descriptor: I
    flags: (0x0002) ACC_PRIVATE

  private final java.lang.Object closeLock;
    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.MongoCollection<com.mongodb.client.gridfs.model.GridFSFile>, com.mongodb.client.MongoCollection<org.bson.Document>, org.bson.BsonValue, java.lang.String, int, boolean, org.bson.Document);
    descriptor: (Lcom/mongodb/client/ClientSession;Lcom/mongodb/client/MongoCollection;Lcom/mongodb/client/MongoCollection;Lorg/bson/BsonValue;Ljava/lang/String;IZLorg/bson/Document;)V
    flags: (0x0000) 
    Code:
      stack=3, locals=9, args_size=9
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
        start local 1 // com.mongodb.client.ClientSession clientSession
        start local 2 // com.mongodb.client.MongoCollection filesCollection
        start local 3 // com.mongodb.client.MongoCollection chunksCollection
        start local 4 // org.bson.BsonValue fileId
        start local 5 // java.lang.String filename
        start local 6 // int chunkSizeBytes
        start local 7 // boolean disableMD5
        start local 8 // org.bson.Document metadata
         0: .line 53
            aload 0 /* this */
            invokespecial com.mongodb.client.gridfs.GridFSUploadStream.<init>:()V
         1: .line 50
            aload 0 /* this */
            new java.lang.Object
            dup
            invokespecial java.lang.Object.<init>:()V
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closeLock:Ljava/lang/Object;
         2: .line 51
            aload 0 /* this */
            iconst_0
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closed:Z
         3: .line 56
            aload 0 /* this */
            aload 1 /* clientSession */
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
         4: .line 57
            aload 0 /* this */
            ldc "files collection"
            aload 2 /* filesCollection */
            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.GridFSUploadStreamImpl.filesCollection:Lcom/mongodb/client/MongoCollection;
         5: .line 58
            aload 0 /* this */
            ldc "chunks collection"
            aload 3 /* chunksCollection */
            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.GridFSUploadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
         6: .line 59
            aload 0 /* this */
            ldc "File Id"
            aload 4 /* fileId */
            invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.bson.BsonValue
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
         7: .line 60
            aload 0 /* this */
            ldc "filename"
            aload 5 /* filename */
            invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
            checkcast java.lang.String
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.filename:Ljava/lang/String;
         8: .line 61
            aload 0 /* this */
            iload 6 /* chunkSizeBytes */
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkSizeBytes:I
         9: .line 62
            aload 0 /* this */
            aload 0 /* this */
            iload 7 /* disableMD5 */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.createMD5Digest:(Z)Ljava/security/MessageDigest;
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.md5:Ljava/security/MessageDigest;
        10: .line 63
            aload 0 /* this */
            aload 8 /* metadata */
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.metadata:Lorg/bson/Document;
        11: .line 64
            aload 0 /* this */
            iconst_0
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkIndex:I
        12: .line 65
            aload 0 /* this */
            iconst_0
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
        13: .line 66
            aload 0 /* this */
            iload 6 /* chunkSizeBytes */
            newarray 8
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
        14: .line 67
            return
        end local 8 // org.bson.Document metadata
        end local 7 // boolean disableMD5
        end local 6 // int chunkSizeBytes
        end local 5 // java.lang.String filename
        end local 4 // org.bson.BsonValue fileId
        end local 3 // com.mongodb.client.MongoCollection chunksCollection
        end local 2 // com.mongodb.client.MongoCollection filesCollection
        end local 1 // com.mongodb.client.ClientSession clientSession
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot              Name  Signature
            0   15     0              this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
            0   15     1     clientSession  Lcom/mongodb/client/ClientSession;
            0   15     2   filesCollection  Lcom/mongodb/client/MongoCollection<Lcom/mongodb/client/gridfs/model/GridFSFile;>;
            0   15     3  chunksCollection  Lcom/mongodb/client/MongoCollection<Lorg/bson/Document;>;
            0   15     4            fileId  Lorg/bson/BsonValue;
            0   15     5          filename  Ljava/lang/String;
            0   15     6    chunkSizeBytes  I
            0   15     7        disableMD5  Z
            0   15     8          metadata  Lorg/bson/Document;
    Signature: (Lcom/mongodb/client/ClientSession;Lcom/mongodb/client/MongoCollection<Lcom/mongodb/client/gridfs/model/GridFSFile;>;Lcom/mongodb/client/MongoCollection<Lorg/bson/Document;>;Lorg/bson/BsonValue;Ljava/lang/String;IZLorg/bson/Document;)V
    RuntimeVisibleParameterAnnotations: 
      0:
        com.mongodb.lang.Nullable()
      1:
      2:
      3:
      4:
      5:
      6:
      7:
        com.mongodb.lang.Nullable()
    MethodParameters:
                  Name  Flags
      clientSession     final
      filesCollection   final
      chunksCollection  final
      fileId            final
      filename          final
      chunkSizeBytes    final
      disableMD5        final
      metadata          final

  public org.bson.types.ObjectId getFileId();
    descriptor: ()Lorg/bson/types/ObjectId;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 72
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.getObjectId:()Lorg/bson/types/ObjectId;
            areturn
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;

  public org.bson.types.ObjectId getObjectId();
    descriptor: ()Lorg/bson/types/ObjectId;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 77
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            invokevirtual org.bson.BsonValue.isObjectId:()Z
            ifne 2
         1: .line 78
            new com.mongodb.MongoGridFSException
            dup
            ldc "Custom id type used for this GridFS upload stream"
            invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 80
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            invokevirtual org.bson.BsonValue.asObjectId:()Lorg/bson/BsonObjectId;
            invokevirtual org.bson.BsonObjectId.getValue:()Lorg/bson/types/ObjectId;
            areturn
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;

  public org.bson.BsonValue getId();
    descriptor: ()Lorg/bson/BsonValue;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 85
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            areturn
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;

  public void abort();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=6, locals=2, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 90
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closeLock:Ljava/lang/Object;
            dup
            astore 1
            monitorenter
         1: .line 91
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.checkClosed:()V
         2: .line 92
            aload 0 /* this */
            iconst_1
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closed:Z
         3: .line 90
            aload 1
            monitorexit
         4: goto 7
      StackMap locals: com.mongodb.client.gridfs.GridFSUploadStreamImpl java.lang.Object
      StackMap stack: java.lang.Throwable
         5: aload 1
            monitorexit
         6: athrow
         7: .line 94
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
            ifnull 10
         8: .line 95
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
            new org.bson.Document
            dup
            ldc "files_id"
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
            invokeinterface com.mongodb.client.MongoCollection.deleteMany:(Lcom/mongodb/client/ClientSession;Lorg/bson/conversions/Bson;)Lcom/mongodb/client/result/DeleteResult;
            pop
         9: .line 96
            goto 11
        10: .line 97
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
            new org.bson.Document
            dup
            ldc "files_id"
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
            invokeinterface com.mongodb.client.MongoCollection.deleteMany:(Lorg/bson/conversions/Bson;)Lcom/mongodb/client/result/DeleteResult;
            pop
        11: .line 99
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   12     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
      Exception table:
        from    to  target  type
           1     4       5  any
           5     6       5  any

  public void write(int);
    descriptor: (I)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=2
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
        start local 1 // int b
         0: .line 103
            iconst_1
            newarray 8
            astore 2 /* byteArray */
        start local 2 // byte[] byteArray
         1: .line 104
            aload 2 /* byteArray */
            iconst_0
            sipush 255
            iload 1 /* b */
            iand
            i2b
            bastore
         2: .line 105
            aload 0 /* this */
            aload 2 /* byteArray */
            iconst_0
            iconst_1
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.write:([BII)V
         3: .line 106
            return
        end local 2 // byte[] byteArray
        end local 1 // int b
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    4     0       this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
            0    4     1          b  I
            1    4     2  byteArray  [B
    MethodParameters:
      Name  Flags
      b     final

  public void write(byte[]);
    descriptor: ([B)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
        start local 1 // byte[] b
         0: .line 110
            aload 0 /* this */
            aload 1 /* b */
            iconst_0
            aload 1 /* b */
            arraylength
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.write:([BII)V
         1: .line 111
            return
        end local 1 // byte[] b
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
            0    2     1     b  [B
    MethodParameters:
      Name  Flags
      b     final

  public void write(byte[], int, int);
    descriptor: ([BII)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=7, args_size=4
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
        start local 1 // byte[] b
        start local 2 // int off
        start local 3 // int len
         0: .line 115
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.checkClosed:()V
         1: .line 116
            ldc "b"
            aload 1 /* b */
            invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         2: .line 118
            iload 2 /* off */
            iflt 4
            iload 2 /* off */
            aload 1 /* b */
            arraylength
            if_icmpgt 4
            iload 3 /* len */
            iflt 4
         3: .line 119
            iload 2 /* off */
            iload 3 /* len */
            iadd
            aload 1 /* b */
            arraylength
            if_icmpgt 4
            iload 2 /* off */
            iload 3 /* len */
            iadd
            ifge 5
         4: .line 120
      StackMap locals:
      StackMap stack:
            new java.lang.IndexOutOfBoundsException
            dup
            invokespecial java.lang.IndexOutOfBoundsException.<init>:()V
            athrow
         5: .line 121
      StackMap locals:
      StackMap stack:
            iload 3 /* len */
            ifne 7
         6: .line 122
            return
         7: .line 125
      StackMap locals:
      StackMap stack:
            iload 2 /* off */
            istore 4 /* currentOffset */
        start local 4 // int currentOffset
         8: .line 126
            iload 3 /* len */
            istore 5 /* lengthToWrite */
        start local 5 // int lengthToWrite
         9: .line 127
            iconst_0
            istore 6 /* amountToCopy */
        start local 6 // int amountToCopy
        10: .line 129
            goto 21
        11: .line 130
      StackMap locals: int int int
      StackMap stack:
            iload 5 /* lengthToWrite */
            istore 6 /* amountToCopy */
        12: .line 131
            iload 6 /* amountToCopy */
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkSizeBytes:I
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            isub
            if_icmple 14
        13: .line 132
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkSizeBytes:I
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            isub
            istore 6 /* amountToCopy */
        14: .line 134
      StackMap locals:
      StackMap stack:
            aload 1 /* b */
            iload 4 /* currentOffset */
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            iload 6 /* amountToCopy */
            invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
        15: .line 136
            aload 0 /* this */
            dup
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            iload 6 /* amountToCopy */
            iadd
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
        16: .line 137
            iload 4 /* currentOffset */
            iload 6 /* amountToCopy */
            iadd
            istore 4 /* currentOffset */
        17: .line 138
            iload 5 /* lengthToWrite */
            iload 6 /* amountToCopy */
            isub
            istore 5 /* lengthToWrite */
        18: .line 139
            aload 0 /* this */
            dup
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.lengthInBytes:J
            iload 6 /* amountToCopy */
            i2l
            ladd
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.lengthInBytes:J
        19: .line 141
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkSizeBytes:I
            if_icmpne 21
        20: .line 142
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.writeChunk:()V
        21: .line 129
      StackMap locals:
      StackMap stack:
            iload 5 /* lengthToWrite */
            ifgt 11
        22: .line 145
            return
        end local 6 // int amountToCopy
        end local 5 // int lengthToWrite
        end local 4 // int currentOffset
        end local 3 // int len
        end local 2 // int off
        end local 1 // byte[] b
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot           Name  Signature
            0   23     0           this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
            0   23     1              b  [B
            0   23     2            off  I
            0   23     3            len  I
            8   23     4  currentOffset  I
            9   23     5  lengthToWrite  I
           10   23     6   amountToCopy  I
    MethodParameters:
      Name  Flags
      b     final
      off   final
      len   final

  public void close();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=10, locals=2, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 149
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closeLock:Ljava/lang/Object;
            dup
            astore 1
            monitorenter
         1: .line 150
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closed:Z
            ifeq 4
         2: .line 151
            aload 1
            monitorexit
         3: return
         4: .line 153
      StackMap locals: java.lang.Object
      StackMap stack:
            aload 0 /* this */
            iconst_1
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closed:Z
         5: .line 149
            aload 1
            monitorexit
         6: goto 9
      StackMap locals:
      StackMap stack: java.lang.Throwable
         7: aload 1
            monitorexit
         8: athrow
         9: .line 155
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.writeChunk:()V
        10: .line 156
            new com.mongodb.client.gridfs.model.GridFSFile
            dup
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.filename:Ljava/lang/String;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.lengthInBytes:J
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkSizeBytes:I
            new java.util.Date
            dup
            invokespecial java.util.Date.<init>:()V
        11: .line 157
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.getMD5Digest:()Ljava/lang/String;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.metadata:Lorg/bson/Document;
        12: .line 156
            invokespecial com.mongodb.client.gridfs.model.GridFSFile.<init>:(Lorg/bson/BsonValue;Ljava/lang/String;JILjava/util/Date;Ljava/lang/String;Lorg/bson/Document;)V
            astore 1 /* gridFSFile */
        start local 1 // com.mongodb.client.gridfs.model.GridFSFile gridFSFile
        13: .line 158
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
            ifnull 16
        14: .line 159
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.filesCollection:Lcom/mongodb/client/MongoCollection;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
            aload 1 /* gridFSFile */
            invokeinterface com.mongodb.client.MongoCollection.insertOne:(Lcom/mongodb/client/ClientSession;Ljava/lang/Object;)V
        15: .line 160
            goto 17
        16: .line 161
      StackMap locals: com.mongodb.client.gridfs.model.GridFSFile
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.filesCollection:Lcom/mongodb/client/MongoCollection;
            aload 1 /* gridFSFile */
            invokeinterface com.mongodb.client.MongoCollection.insertOne:(Ljava/lang/Object;)V
        17: .line 163
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aconst_null
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
        18: .line 164
            return
        end local 1 // com.mongodb.client.gridfs.model.GridFSFile gridFSFile
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0   19     0        this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
           13   19     1  gridFSFile  Lcom/mongodb/client/gridfs/model/GridFSFile;
      Exception table:
        from    to  target  type
           1     3       7  any
           4     6       7  any
           7     8       7  any

  private void writeChunk();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=6, locals=1, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 167
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            ifle 10
         1: .line 168
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
            ifnull 6
         2: .line 169
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.clientSession:Lcom/mongodb/client/ClientSession;
            new org.bson.Document
            dup
            ldc "files_id"
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
            ldc "n"
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkIndex:I
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            invokevirtual org.bson.Document.append:(Ljava/lang/String;Ljava/lang/Object;)Lorg/bson/Document;
         3: .line 170
            ldc "data"
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.getData:()Lorg/bson/types/Binary;
            invokevirtual org.bson.Document.append:(Ljava/lang/String;Ljava/lang/Object;)Lorg/bson/Document;
         4: .line 169
            invokeinterface com.mongodb.client.MongoCollection.insertOne:(Lcom/mongodb/client/ClientSession;Ljava/lang/Object;)V
         5: .line 171
            goto 7
         6: .line 172
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunksCollection:Lcom/mongodb/client/MongoCollection;
            new org.bson.Document
            dup
            ldc "files_id"
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.fileId:Lorg/bson/BsonValue;
            invokespecial org.bson.Document.<init>:(Ljava/lang/String;Ljava/lang/Object;)V
            ldc "n"
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkIndex:I
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            invokevirtual org.bson.Document.append:(Ljava/lang/String;Ljava/lang/Object;)Lorg/bson/Document;
            ldc "data"
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.getData:()Lorg/bson/types/Binary;
            invokevirtual org.bson.Document.append:(Ljava/lang/String;Ljava/lang/Object;)Lorg/bson/Document;
            invokeinterface com.mongodb.client.MongoCollection.insertOne:(Ljava/lang/Object;)V
         7: .line 174
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            invokevirtual com.mongodb.client.gridfs.GridFSUploadStreamImpl.updateMD5:()V
         8: .line 175
            aload 0 /* this */
            dup
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkIndex:I
            iconst_1
            iadd
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkIndex:I
         9: .line 176
            aload 0 /* this */
            iconst_0
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
        10: .line 178
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   11     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;

  private org.bson.types.Binary getData();
    descriptor: ()Lorg/bson/types/Binary;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=5, locals=2, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 181
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.chunkSizeBytes:I
            if_icmpge 4
         1: .line 182
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            newarray 8
            astore 1 /* sizedBuffer */
        start local 1 // byte[] sizedBuffer
         2: .line 183
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
            iconst_0
            aload 1 /* sizedBuffer */
            iconst_0
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.bufferOffset:I
            invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
         3: .line 184
            aload 0 /* this */
            aload 1 /* sizedBuffer */
            putfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
        end local 1 // byte[] sizedBuffer
         4: .line 186
      StackMap locals:
      StackMap stack:
            new org.bson.types.Binary
            dup
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
            invokespecial org.bson.types.Binary.<init>:([B)V
            areturn
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot         Name  Signature
            0    5     0         this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
            2    4     1  sizedBuffer  [B

  private void checkClosed();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=3, locals=2, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 190
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closeLock:Ljava/lang/Object;
            dup
            astore 1
            monitorenter
         1: .line 191
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.closed:Z
            ifeq 3
         2: .line 192
            new com.mongodb.MongoGridFSException
            dup
            ldc "The OutputStream has been closed"
            invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 190
      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: .line 195
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    8     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
      Exception table:
        from    to  target  type
           1     4       5  any
           5     6       5  any

  private java.security.MessageDigest createMD5Digest(boolean);
    descriptor: (Z)Ljava/security/MessageDigest;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=3, args_size=2
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
        start local 1 // boolean disableMD5
         0: .line 199
            iload 1 /* disableMD5 */
            ifeq 2
         1: .line 200
            aconst_null
            areturn
         2: .line 203
      StackMap locals:
      StackMap stack:
            ldc "MD5"
            invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
         3: areturn
         4: .line 204
      StackMap locals:
      StackMap stack: java.security.NoSuchAlgorithmException
            astore 2 /* e */
        start local 2 // java.security.NoSuchAlgorithmException e
         5: .line 205
            new com.mongodb.MongoGridFSException
            dup
            ldc "No MD5 message digest available. Use `GridFSBucket.withDisableMD5(true)` to disable creating a MD5 hash."
         6: .line 206
            aload 2 /* e */
         7: .line 205
            invokespecial com.mongodb.MongoGridFSException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
            athrow
        end local 2 // java.security.NoSuchAlgorithmException e
        end local 1 // boolean disableMD5
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0    8     0        this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
            0    8     1  disableMD5  Z
            5    8     2           e  Ljava/security/NoSuchAlgorithmException;
      Exception table:
        from    to  target  type
           2     3       4  Class java.security.NoSuchAlgorithmException
    RuntimeVisibleAnnotations: 
      com.mongodb.lang.Nullable()
    MethodParameters:
            Name  Flags
      disableMD5  final

  private java.lang.String getMD5Digest();
    descriptor: ()Ljava/lang/String;
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 213
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.md5:Ljava/security/MessageDigest;
            ifnull 1
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.md5:Ljava/security/MessageDigest;
            invokevirtual java.security.MessageDigest.digest:()[B
            invokestatic com.mongodb.internal.HexUtils.toHex:([B)Ljava/lang/String;
            goto 2
      StackMap locals:
      StackMap stack:
         1: aconst_null
      StackMap locals:
      StackMap stack: java.lang.String
         2: areturn
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
    RuntimeVisibleAnnotations: 
      com.mongodb.lang.Nullable()

  private void updateMD5();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
         0: .line 217
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.md5:Ljava/security/MessageDigest;
            ifnull 2
         1: .line 218
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.md5:Ljava/security/MessageDigest;
            aload 0 /* this */
            getfield com.mongodb.client.gridfs.GridFSUploadStreamImpl.buffer:[B
            invokevirtual java.security.MessageDigest.update:([B)V
         2: .line 220
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.mongodb.client.gridfs.GridFSUploadStreamImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Lcom/mongodb/client/gridfs/GridFSUploadStreamImpl;
}
SourceFile: "GridFSUploadStreamImpl.java"