public final class jdk.jfr.internal.management.ChunkFilename
  minor version: 0
  major version: 59
  flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
  this_class: jdk.jfr.internal.management.ChunkFilename
  super_class: java.lang.Object
{
  private static final int MAX_CHUNK_NAMES;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: 100000

  private static final java.lang.String FILE_EXTENSION;
    descriptor: Ljava/lang/String;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: ".jfr"

  private final java.nio.file.Path directory;
    descriptor: Ljava/nio/file/Path;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final jdk.jfr.internal.consumer.FileAccess fileAcess;
    descriptor: Ljdk/jfr/internal/consumer/FileAccess;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private java.nio.file.Path lastPath;
    descriptor: Ljava/nio/file/Path;
    flags: (0x0002) ACC_PRIVATE

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

  public static jdk.jfr.internal.management.ChunkFilename newUnpriviliged(java.nio.file.Path);
    descriptor: (Ljava/nio/file/Path;)Ljdk/jfr/internal/management/ChunkFilename;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=1, args_size=1
        start local 0 // java.nio.file.Path directory
         0: .line 53
            new jdk.jfr.internal.management.ChunkFilename
            dup
            aload 0 /* directory */
            getstatic jdk.jfr.internal.consumer.FileAccess.UNPRIVILEGED:Ljdk/jfr/internal/consumer/FileAccess;
            invokespecial jdk.jfr.internal.management.ChunkFilename.<init>:(Ljava/nio/file/Path;Ljdk/jfr/internal/consumer/FileAccess;)V
            areturn
        end local 0 // java.nio.file.Path directory
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    1     0  directory  Ljava/nio/file/Path;
    MethodParameters:
           Name  Flags
      directory  

  public static jdk.jfr.internal.management.ChunkFilename newPriviliged(java.nio.file.Path);
    descriptor: (Ljava/nio/file/Path;)Ljdk/jfr/internal/management/ChunkFilename;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=1, args_size=1
        start local 0 // java.nio.file.Path directory
         0: .line 57
            new jdk.jfr.internal.management.ChunkFilename
            dup
            aload 0 /* directory */
            getstatic jdk.jfr.internal.SecuritySupport.PRIVILEGED:Ljdk/jfr/internal/consumer/FileAccess;
            invokespecial jdk.jfr.internal.management.ChunkFilename.<init>:(Ljava/nio/file/Path;Ljdk/jfr/internal/consumer/FileAccess;)V
            areturn
        end local 0 // java.nio.file.Path directory
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    1     0  directory  Ljava/nio/file/Path;
    MethodParameters:
           Name  Flags
      directory  

  private void <init>(java.nio.file.Path, jdk.jfr.internal.consumer.FileAccess);
    descriptor: (Ljava/nio/file/Path;Ljdk/jfr/internal/consumer/FileAccess;)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=3, locals=3, args_size=3
        start local 0 // jdk.jfr.internal.management.ChunkFilename this
        start local 1 // java.nio.file.Path directory
        start local 2 // jdk.jfr.internal.consumer.FileAccess fileAccess
         0: .line 60
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 62
            aload 0 /* this */
            aload 1 /* directory */
            invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
            iconst_0
            anewarray java.lang.String
            invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
            putfield jdk.jfr.internal.management.ChunkFilename.directory:Ljava/nio/file/Path;
         2: .line 63
            aload 0 /* this */
            aload 2 /* fileAccess */
            putfield jdk.jfr.internal.management.ChunkFilename.fileAcess:Ljdk/jfr/internal/consumer/FileAccess;
         3: .line 64
            return
        end local 2 // jdk.jfr.internal.consumer.FileAccess fileAccess
        end local 1 // java.nio.file.Path directory
        end local 0 // jdk.jfr.internal.management.ChunkFilename this
      LocalVariableTable:
        Start  End  Slot        Name  Signature
            0    4     0        this  Ljdk/jfr/internal/management/ChunkFilename;
            0    4     1   directory  Ljava/nio/file/Path;
            0    4     2  fileAccess  Ljdk/jfr/internal/consumer/FileAccess;
    MethodParameters:
            Name  Flags
      directory   
      fileAccess  

  public java.lang.String next(java.time.LocalDateTime);
    descriptor: (Ljava/time/LocalDateTime;)Ljava/lang/String;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=5, args_size=2
        start local 0 // jdk.jfr.internal.management.ChunkFilename this
        start local 1 // java.time.LocalDateTime time
         0: .line 67
            aload 1 /* time */
            invokestatic jdk.jfr.internal.Utils.formatDateTime:(Ljava/time/LocalDateTime;)Ljava/lang/String;
            astore 2 /* filename */
        start local 2 // java.lang.String filename
         1: .line 68
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.directory:Ljava/nio/file/Path;
            new java.lang.StringBuilder
            dup
            aload 2 /* filename */
            invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            ldc ".jfr"
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
            astore 3 /* p */
        start local 3 // java.nio.file.Path p
         2: .line 71
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.lastPath:Ljava/nio/file/Path;
            ifnull 3
            aload 3 /* p */
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.lastPath:Ljava/nio/file/Path;
            invokeinterface java.nio.file.Path.equals:(Ljava/lang/Object;)Z
            ifne 12
         3: .line 72
      StackMap locals: java.lang.String java.nio.file.Path
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.fileAcess:Ljdk/jfr/internal/consumer/FileAccess;
            aload 3 /* p */
            invokevirtual jdk.jfr.internal.consumer.FileAccess.exists:(Ljava/nio/file/Path;)Z
            ifne 12
         4: .line 73
            aload 0 /* this */
            iconst_1
            putfield jdk.jfr.internal.management.ChunkFilename.counter:I
         5: .line 74
            aload 0 /* this */
            aload 3 /* p */
            putfield jdk.jfr.internal.management.ChunkFilename.lastPath:Ljava/nio/file/Path;
         6: .line 75
            aload 3 /* p */
            invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
            areturn
         7: .line 81
      StackMap locals:
      StackMap stack:
            ldc "%s_%02d%s"
            iconst_3
            anewarray java.lang.Object
            dup
            iconst_0
            aload 2 /* filename */
            aastore
            dup
            iconst_1
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.counter:I
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_2
            ldc ".jfr"
            aastore
            invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
            astore 4 /* extendedName */
        start local 4 // java.lang.String extendedName
         8: .line 82
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.directory:Ljava/nio/file/Path;
            aload 4 /* extendedName */
            invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
            astore 3 /* p */
         9: .line 83
            aload 0 /* this */
            dup
            getfield jdk.jfr.internal.management.ChunkFilename.counter:I
            iconst_1
            iadd
            putfield jdk.jfr.internal.management.ChunkFilename.counter:I
        10: .line 84
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.fileAcess:Ljdk/jfr/internal/consumer/FileAccess;
            aload 3 /* p */
            invokevirtual jdk.jfr.internal.consumer.FileAccess.exists:(Ljava/nio/file/Path;)Z
            ifne 12
        11: .line 85
            aload 3 /* p */
            invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
            areturn
        end local 4 // java.lang.String extendedName
        12: .line 80
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.counter:I
            ldc 100000
            if_icmplt 7
        13: .line 88
            new java.io.IOException
            dup
            new java.lang.StringBuilder
            dup
            ldc "Unable to find unused filename after "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 0 /* this */
            getfield jdk.jfr.internal.management.ChunkFilename.counter:I
            invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
            ldc " attempts"
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
            athrow
        end local 3 // java.nio.file.Path p
        end local 2 // java.lang.String filename
        end local 1 // java.time.LocalDateTime time
        end local 0 // jdk.jfr.internal.management.ChunkFilename this
      LocalVariableTable:
        Start  End  Slot          Name  Signature
            0   14     0          this  Ljdk/jfr/internal/management/ChunkFilename;
            0   14     1          time  Ljava/time/LocalDateTime;
            1   14     2      filename  Ljava/lang/String;
            2   14     3             p  Ljava/nio/file/Path;
            8   12     4  extendedName  Ljava/lang/String;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      time  
}
SourceFile: "ChunkFilename.java"