final class jdk.jfr.internal.ChunksChannel implements java.nio.channels.ReadableByteChannel
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: jdk.jfr.internal.ChunksChannel
  super_class: java.lang.Object
{
  private final java.util.Iterator<jdk.jfr.internal.RepositoryChunk> chunks;
    descriptor: Ljava/util/Iterator;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/Iterator<Ljdk/jfr/internal/RepositoryChunk;>;

  private jdk.jfr.internal.RepositoryChunk current;
    descriptor: Ljdk/jfr/internal/RepositoryChunk;
    flags: (0x0002) ACC_PRIVATE

  private java.nio.channels.ReadableByteChannel channel;
    descriptor: Ljava/nio/channels/ReadableByteChannel;
    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: .line 37
            ldc Ljdk/jfr/internal/ChunksChannel;
            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 jdk.jfr.internal.ChunksChannel.$assertionsDisabled:Z
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  public void <init>(java.util.List<jdk.jfr.internal.RepositoryChunk>);
    descriptor: (Ljava/util/List;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=5, args_size=2
        start local 0 // jdk.jfr.internal.ChunksChannel this
        start local 1 // java.util.List chunks
         0: .line 42
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 43
            aload 1 /* chunks */
            invokeinterface java.util.List.isEmpty:()Z
            ifeq 3
         2: .line 44
            new java.io.FileNotFoundException
            dup
            ldc "No chunks"
            invokespecial java.io.FileNotFoundException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 46
      StackMap locals: jdk.jfr.internal.ChunksChannel java.util.List
      StackMap stack:
            new java.util.ArrayList
            dup
            aload 1 /* chunks */
            invokeinterface java.util.List.size:()I
            invokespecial java.util.ArrayList.<init>:(I)V
            astore 2 /* l */
        start local 2 // java.util.List l
         4: .line 47
            aload 1 /* chunks */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 4
            goto 8
      StackMap locals: jdk.jfr.internal.ChunksChannel java.util.List java.util.List top java.util.Iterator
      StackMap stack:
         5: aload 4
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast jdk.jfr.internal.RepositoryChunk
            astore 3 /* c */
        start local 3 // jdk.jfr.internal.RepositoryChunk c
         6: .line 48
            aload 3 /* c */
            invokevirtual jdk.jfr.internal.RepositoryChunk.use:()V
         7: .line 49
            aload 2 /* l */
            aload 3 /* c */
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        end local 3 // jdk.jfr.internal.RepositoryChunk c
         8: .line 47
      StackMap locals:
      StackMap stack:
            aload 4
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 5
         9: .line 51
            aload 0 /* this */
            aload 2 /* l */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            putfield jdk.jfr.internal.ChunksChannel.chunks:Ljava/util/Iterator;
        10: .line 52
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.ChunksChannel.nextChannel:()Z
            pop
        11: .line 53
            return
        end local 2 // java.util.List l
        end local 1 // java.util.List chunks
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   12     0    this  Ljdk/jfr/internal/ChunksChannel;
            0   12     1  chunks  Ljava/util/List<Ljdk/jfr/internal/RepositoryChunk;>;
            4   12     2       l  Ljava/util/List<Ljdk/jfr/internal/RepositoryChunk;>;
            6    8     3       c  Ljdk/jfr/internal/RepositoryChunk;
    Exceptions:
      throws java.io.IOException
    Signature: (Ljava/util/List<Ljdk/jfr/internal/RepositoryChunk;>;)V
    MethodParameters:
        Name  Flags
      chunks  

  private boolean nextChunk();
    descriptor: ()Z
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.jfr.internal.ChunksChannel this
         0: .line 56
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.chunks:Ljava/util/Iterator;
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 2
         1: .line 57
            iconst_0
            ireturn
         2: .line 59
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.chunks:Ljava/util/Iterator;
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast jdk.jfr.internal.RepositoryChunk
            putfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
         3: .line 60
            iconst_1
            ireturn
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    4     0  this  Ljdk/jfr/internal/ChunksChannel;

  private boolean nextChannel();
    descriptor: ()Z
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.jfr.internal.ChunksChannel this
         0: .line 64
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.ChunksChannel.nextChunk:()Z
            ifne 2
         1: .line 65
            iconst_0
            ireturn
         2: .line 68
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            invokevirtual jdk.jfr.internal.RepositoryChunk.newChannel:()Ljava/nio/channels/ReadableByteChannel;
            putfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
         3: .line 69
            iconst_1
            ireturn
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    4     0  this  Ljdk/jfr/internal/ChunksChannel;
    Exceptions:
      throws java.io.IOException

  public int read(java.nio.ByteBuffer);
    descriptor: (Ljava/nio/ByteBuffer;)I
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=2
        start local 0 // jdk.jfr.internal.ChunksChannel this
        start local 1 // java.nio.ByteBuffer dst
         0: .line 75
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            ifnull 9
         1: .line 76
            getstatic jdk.jfr.internal.ChunksChannel.$assertionsDisabled:Z
            ifne 2
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            ifnonnull 2
            new java.lang.AssertionError
            dup
            invokespecial java.lang.AssertionError.<init>:()V
            athrow
         2: .line 77
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            aload 1 /* dst */
            invokeinterface java.nio.channels.ReadableByteChannel.read:(Ljava/nio/ByteBuffer;)I
            istore 2 /* r */
        start local 2 // int r
         3: .line 78
            iload 2 /* r */
            iconst_m1
            if_icmpeq 5
         4: .line 79
            iload 2 /* r */
            ireturn
         5: .line 81
      StackMap locals: int
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            invokeinterface java.nio.channels.ReadableByteChannel.close:()V
         6: .line 82
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            invokevirtual jdk.jfr.internal.RepositoryChunk.release:()V
         7: .line 83
            aload 0 /* this */
            aconst_null
            putfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
         8: .line 84
            aload 0 /* this */
            aconst_null
            putfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
        end local 2 // int r
         9: .line 86
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.ChunksChannel.nextChannel:()Z
            ifne 0
        10: .line 87
            iconst_m1
            ireturn
        end local 1 // java.nio.ByteBuffer dst
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   11     0  this  Ljdk/jfr/internal/ChunksChannel;
            0   11     1   dst  Ljava/nio/ByteBuffer;
            3    9     2     r  I
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      dst   

  public long transferTo(java.nio.channels.FileChannel);
    descriptor: (Ljava/nio/channels/FileChannel;)J
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=6, locals=10, args_size=2
        start local 0 // jdk.jfr.internal.ChunksChannel this
        start local 1 // java.nio.channels.FileChannel out
         0: .line 93
            lconst_0
            lstore 2 /* pos */
        start local 2 // long pos
         1: .line 95
      StackMap locals: long
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            ifnull 14
         2: .line 96
            getstatic jdk.jfr.internal.ChunksChannel.$assertionsDisabled:Z
            ifne 3
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            ifnonnull 3
            new java.lang.AssertionError
            dup
            invokespecial java.lang.AssertionError.<init>:()V
            athrow
         3: .line 98
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            invokevirtual jdk.jfr.internal.RepositoryChunk.getSize:()J
            lstore 4 /* rem */
        start local 4 // long rem
         4: .line 100
            goto 9
         5: .line 101
      StackMap locals: long
      StackMap stack:
            lload 4 /* rem */
            ldc 1048576
            invokestatic java.lang.Math.min:(JJ)J
            lstore 6 /* n */
        start local 6 // long n
         6: .line 102
            aload 1 /* out */
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            lload 2 /* pos */
            lload 6 /* n */
            invokevirtual java.nio.channels.FileChannel.transferFrom:(Ljava/nio/channels/ReadableByteChannel;JJ)J
            lstore 8 /* w */
        start local 8 // long w
         7: .line 103
            lload 2 /* pos */
            lload 8 /* w */
            ladd
            lstore 2 /* pos */
         8: .line 104
            lload 4 /* rem */
            lload 8 /* w */
            lsub
            lstore 4 /* rem */
        end local 8 // long w
        end local 6 // long n
         9: .line 100
      StackMap locals:
      StackMap stack:
            lload 4 /* rem */
            lconst_0
            lcmp
            ifgt 5
        10: .line 107
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            invokeinterface java.nio.channels.ReadableByteChannel.close:()V
        11: .line 108
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            invokevirtual jdk.jfr.internal.RepositoryChunk.release:()V
        12: .line 110
            aload 0 /* this */
            aconst_null
            putfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
        13: .line 111
            aload 0 /* this */
            aconst_null
            putfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
        end local 4 // long rem
        14: .line 113
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.ChunksChannel.nextChannel:()Z
            ifne 1
        15: .line 114
            lload 2 /* pos */
            lreturn
        end local 2 // long pos
        end local 1 // java.nio.channels.FileChannel out
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   16     0  this  Ljdk/jfr/internal/ChunksChannel;
            0   16     1   out  Ljava/nio/channels/FileChannel;
            1   16     2   pos  J
            4   14     4   rem  J
            6    9     6     n  J
            7    9     8     w  J
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      out   

  public void close();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // jdk.jfr.internal.ChunksChannel this
         0: .line 121
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            ifnull 8
         1: .line 122
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            invokeinterface java.nio.channels.ReadableByteChannel.close:()V
         2: .line 123
            aload 0 /* this */
            aconst_null
            putfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
         3: .line 125
            goto 8
         4: .line 126
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            invokevirtual jdk.jfr.internal.RepositoryChunk.release:()V
         5: .line 127
            aload 0 /* this */
            aconst_null
            putfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
         6: .line 128
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.ChunksChannel.nextChunk:()Z
            ifne 8
         7: .line 129
            return
         8: .line 125
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.current:Ljdk/jfr/internal/RepositoryChunk;
            ifnonnull 4
         9: .line 132
            return
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   10     0  this  Ljdk/jfr/internal/ChunksChannel;
    Exceptions:
      throws java.io.IOException

  public boolean isOpen();
    descriptor: ()Z
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.jfr.internal.ChunksChannel this
         0: .line 136
            aload 0 /* this */
            getfield jdk.jfr.internal.ChunksChannel.channel:Ljava/nio/channels/ReadableByteChannel;
            ifnull 1
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
         1: iconst_0
            ireturn
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Ljdk/jfr/internal/ChunksChannel;

  protected void finalize();
    descriptor: ()V
    flags: (0x0004) ACC_PROTECTED
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.jfr.internal.ChunksChannel this
         0: .line 142
            aload 0 /* this */
            invokespecial java.lang.Object.finalize:()V
         1: .line 143
            aload 0 /* this */
            invokevirtual jdk.jfr.internal.ChunksChannel.close:()V
         2: .line 144
            return
        end local 0 // jdk.jfr.internal.ChunksChannel this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Ljdk/jfr/internal/ChunksChannel;
    Exceptions:
      throws java.lang.Throwable
}
SourceFile: "ChunksChannel.java"