final class org.jruby.util.io.SeekableByteChannelImpl extends java.nio.channels.spi.AbstractInterruptibleChannel implements java.nio.channels.ReadableByteChannel, java.nio.channels.SeekableByteChannel
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: org.jruby.util.io.SeekableByteChannelImpl
  super_class: java.nio.channels.spi.AbstractInterruptibleChannel
{
  private final java.io.ByteArrayInputStream in;
    descriptor: Ljava/io/ByteArrayInputStream;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

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

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

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

  static final boolean USABLE;
    descriptor: Z
    flags: (0x0018) ACC_STATIC, ACC_FINAL

  private static final java.lang.reflect.Field posField;
    descriptor: Ljava/lang/reflect/Field;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final java.lang.reflect.Field countField;
    descriptor: Ljava/lang/reflect/Field;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final java.lang.reflect.Field markField;
    descriptor: Ljava/lang/reflect/Field;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=0, args_size=0
         0: .line 135
            ldc "pos"
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.accessibleField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
            putstatic org.jruby.util.io.SeekableByteChannelImpl.posField:Ljava/lang/reflect/Field;
         1: .line 136
            getstatic org.jruby.util.io.SeekableByteChannelImpl.posField:Ljava/lang/reflect/Field;
            ifnull 6
         2: .line 137
            ldc "count"
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.accessibleField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
            putstatic org.jruby.util.io.SeekableByteChannelImpl.countField:Ljava/lang/reflect/Field;
         3: .line 138
            ldc "mark"
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.accessibleField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
            putstatic org.jruby.util.io.SeekableByteChannelImpl.markField:Ljava/lang/reflect/Field;
         4: .line 139
            iconst_1
            putstatic org.jruby.util.io.SeekableByteChannelImpl.USABLE:Z
         5: .line 140
            goto 8
         6: .line 142
      StackMap locals:
      StackMap stack:
            aconst_null
            dup
            putstatic org.jruby.util.io.SeekableByteChannelImpl.markField:Ljava/lang/reflect/Field;
            putstatic org.jruby.util.io.SeekableByteChannelImpl.countField:Ljava/lang/reflect/Field;
         7: .line 143
            iconst_0
            putstatic org.jruby.util.io.SeekableByteChannelImpl.USABLE:Z
         8: .line 145
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  void <init>(java.io.ByteArrayInputStream);
    descriptor: (Ljava/io/ByteArrayInputStream;)V
    flags: (0x0000) 
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
        start local 1 // java.io.ByteArrayInputStream in
         0: .line 35
            aload 0 /* this */
            invokespecial java.nio.channels.spi.AbstractInterruptibleChannel.<init>:()V
         1: .line 33
            aload 0 /* this */
            iconst_0
            putfield org.jruby.util.io.SeekableByteChannelImpl.truncatedBy:I
         2: .line 36
            aload 0 /* this */
            aload 1 /* in */
            putfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
         3: .line 37
            aload 0 /* this */
            aload 1 /* in */
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.mark:(Ljava/io/ByteArrayInputStream;)I
            putfield org.jruby.util.io.SeekableByteChannelImpl.mark:I
         4: .line 38
            aload 0 /* this */
            aload 1 /* in */
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.count:(Ljava/io/ByteArrayInputStream;)I
            putfield org.jruby.util.io.SeekableByteChannelImpl.count:I
         5: .line 39
            return
        end local 1 // java.io.ByteArrayInputStream in
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    6     0  this  Lorg/jruby/util/io/SeekableByteChannelImpl;
            0    6     1    in  Ljava/io/ByteArrayInputStream;
    MethodParameters:
      Name  Flags
      in    

  public synchronized int read(java.nio.ByteBuffer);
    descriptor: (Ljava/nio/ByteBuffer;)I
    flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
    Code:
      stack=4, locals=7, args_size=2
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
        start local 1 // java.nio.ByteBuffer target
         0: .line 45
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
            invokevirtual java.io.ByteArrayInputStream.available:()I
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.truncatedBy:I
            isub
            istore 2 /* available */
        start local 2 // int available
         1: .line 46
            iload 2 /* available */
            ifgt 2
            iconst_0
            ireturn
         2: .line 48
      StackMap locals: int
      StackMap stack:
            aload 1 /* target */
            invokevirtual java.nio.ByteBuffer.remaining:()I
            istore 3 /* maxToRead */
        start local 3 // int maxToRead
         3: iconst_0
            istore 4 /* readCount */
        start local 4 // int readCount
         4: .line 50
            iload 3 /* maxToRead */
            iload 2 /* available */
            if_icmple 5
            iload 2 /* available */
            istore 3 /* maxToRead */
         5: .line 51
      StackMap locals: int int
      StackMap stack:
            iload 3 /* maxToRead */
            newarray 8
            astore 5 /* readBytes */
        start local 5 // byte[] readBytes
         6: .line 53
            aload 0 /* this */
            invokevirtual org.jruby.util.io.SeekableByteChannelImpl.begin:()V
         7: .line 54
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
            aload 5 /* readBytes */
            invokevirtual java.io.ByteArrayInputStream.read:([B)I
            istore 4 /* readCount */
         8: .line 55
            goto 14
         9: .line 56
      StackMap locals: org.jruby.util.io.SeekableByteChannelImpl java.nio.ByteBuffer int int int byte[]
      StackMap stack: java.lang.Throwable
            astore 6
        10: .line 57
            aload 0 /* this */
            iload 4 /* readCount */
            iflt 11
            iconst_1
            goto 12
      StackMap locals: org.jruby.util.io.SeekableByteChannelImpl java.nio.ByteBuffer int int int byte[] java.lang.Throwable
      StackMap stack: org.jruby.util.io.SeekableByteChannelImpl
        11: iconst_0
      StackMap locals: org.jruby.util.io.SeekableByteChannelImpl java.nio.ByteBuffer int int int byte[] java.lang.Throwable
      StackMap stack: org.jruby.util.io.SeekableByteChannelImpl int
        12: invokevirtual org.jruby.util.io.SeekableByteChannelImpl.end:(Z)V
        13: .line 58
            aload 6
            athrow
        14: .line 57
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            iload 4 /* readCount */
            iflt 15
            iconst_1
            goto 16
      StackMap locals:
      StackMap stack: org.jruby.util.io.SeekableByteChannelImpl
        15: iconst_0
      StackMap locals: org.jruby.util.io.SeekableByteChannelImpl java.nio.ByteBuffer int int int byte[]
      StackMap stack: org.jruby.util.io.SeekableByteChannelImpl int
        16: invokevirtual org.jruby.util.io.SeekableByteChannelImpl.end:(Z)V
        17: .line 59
            iload 4 /* readCount */
            ifle 19
        18: .line 60
            aload 1 /* target */
            aload 5 /* readBytes */
            iconst_0
            iload 4 /* readCount */
            invokevirtual java.nio.ByteBuffer.put:([BII)Ljava/nio/ByteBuffer;
            pop
        19: .line 62
      StackMap locals:
      StackMap stack:
            iload 4 /* readCount */
            ireturn
        end local 5 // byte[] readBytes
        end local 4 // int readCount
        end local 3 // int maxToRead
        end local 2 // int available
        end local 1 // java.nio.ByteBuffer target
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   20     0       this  Lorg/jruby/util/io/SeekableByteChannelImpl;
            0   20     1     target  Ljava/nio/ByteBuffer;
            1   20     2  available  I
            3   20     3  maxToRead  I
            4   20     4  readCount  I
            6   20     5  readBytes  [B
      Exception table:
        from    to  target  type
           6     9       9  any
    Exceptions:
      throws java.io.IOException
    MethodParameters:
        Name  Flags
      target  

  protected void implCloseChannel();
    descriptor: ()V
    flags: (0x0004) ACC_PROTECTED
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
         0: .line 66
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
            invokevirtual java.io.ByteArrayInputStream.close:()V
            return
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/jruby/util/io/SeekableByteChannelImpl;
    Exceptions:
      throws java.io.IOException

  public long position();
    descriptor: ()J
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
         0: .line 71
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.pos:(Ljava/io/ByteArrayInputStream;)I
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.mark:I
            isub
            i2l
            lreturn
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/jruby/util/io/SeekableByteChannelImpl;

  public synchronized java.nio.channels.SeekableByteChannel position(long);
    descriptor: (J)Ljava/nio/channels/SeekableByteChannel;
    flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
    Code:
      stack=5, locals=3, args_size=2
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
        start local 1 // long newPosition
         0: .line 75
            lload 1 /* newPosition */
            lconst_0
            lcmp
            ifge 2
         1: .line 76
            new java.lang.IllegalArgumentException
            dup
            new java.lang.StringBuilder
            dup
            ldc "negative new position: "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            lload 1 /* newPosition */
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 78
      StackMap locals:
      StackMap stack:
            lload 1 /* newPosition */
            ldc 2147483647
            lcmp
            ifle 4
         3: .line 79
            new java.lang.IllegalArgumentException
            dup
            new java.lang.StringBuilder
            dup
            ldc "can not set new position: "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            lload 1 /* newPosition */
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            ldc " too big!"
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 81
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
            invokevirtual java.io.ByteArrayInputStream.reset:()V
         5: .line 82
            lload 1 /* newPosition */
            lconst_0
            lcmp
            ifle 6
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.in:Ljava/io/ByteArrayInputStream;
            lload 1 /* newPosition */
            invokevirtual java.io.ByteArrayInputStream.skip:(J)J
            pop2
         6: .line 84
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            areturn
        end local 1 // long newPosition
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot         Name  Signature
            0    7     0         this  Lorg/jruby/util/io/SeekableByteChannelImpl;
            0    7     1  newPosition  J
    Exceptions:
      throws java.io.IOException
    MethodParameters:
             Name  Flags
      newPosition  

  public long size();
    descriptor: ()J
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
         0: .line 88
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.count:I
            aload 0 /* this */
            getfield org.jruby.util.io.SeekableByteChannelImpl.truncatedBy:I
            isub
            iconst_0
            invokestatic java.lang.Math.max:(II)I
            i2l
            lreturn
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/jruby/util/io/SeekableByteChannelImpl;

  public java.nio.channels.SeekableByteChannel truncate(long);
    descriptor: (J)Ljava/nio/channels/SeekableByteChannel;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=4, args_size=2
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
        start local 1 // long size
         0: .line 92
            lload 1 /* size */
            lconst_0
            lcmp
            ifge 2
         1: .line 93
            new java.lang.IllegalArgumentException
            dup
            new java.lang.StringBuilder
            dup
            ldc "negative truncate size given: "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            lload 1 /* size */
            invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 95
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            invokevirtual org.jruby.util.io.SeekableByteChannelImpl.size:()J
            l2i
            lload 1 /* size */
            ldc 2147483647
            lcmp
            ifle 3
            ldc 2147483647
            goto 4
      StackMap locals:
      StackMap stack: int
         3: lload 1 /* size */
            l2i
      StackMap locals: org.jruby.util.io.SeekableByteChannelImpl long
      StackMap stack: int int
         4: invokestatic java.lang.Math.min:(II)I
            istore 3 /* s */
        start local 3 // int s
         5: .line 96
            aload 0 /* this */
            dup
            getfield org.jruby.util.io.SeekableByteChannelImpl.truncatedBy:I
            iload 3 /* s */
            iadd
            putfield org.jruby.util.io.SeekableByteChannelImpl.truncatedBy:I
         6: .line 97
            aload 0 /* this */
            areturn
        end local 3 // int s
        end local 1 // long size
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    7     0  this  Lorg/jruby/util/io/SeekableByteChannelImpl;
            0    7     1  size  J
            5    7     3     s  I
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      size  

  public int write(java.nio.ByteBuffer);
    descriptor: (Ljava/nio/ByteBuffer;)I
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // org.jruby.util.io.SeekableByteChannelImpl this
        start local 1 // java.nio.ByteBuffer src
         0: .line 101
            new java.lang.UnsupportedOperationException
            dup
            ldc "write not supported"
            invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
            athrow
        end local 1 // java.nio.ByteBuffer src
        end local 0 // org.jruby.util.io.SeekableByteChannelImpl this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/jruby/util/io/SeekableByteChannelImpl;
            0    1     1   src  Ljava/nio/ByteBuffer;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      src   

  private static int pos(java.io.ByteArrayInputStream);
    descriptor: (Ljava/io/ByteArrayInputStream;)I
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.io.ByteArrayInputStream in
         0: .line 107
            aload 0 /* in */
            getstatic org.jruby.util.io.SeekableByteChannelImpl.posField:Ljava/lang/reflect/Field;
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.readIntField:(Ljava/io/ByteArrayInputStream;Ljava/lang/reflect/Field;)I
            ireturn
        end local 0 // java.io.ByteArrayInputStream in
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0    in  Ljava/io/ByteArrayInputStream;
    MethodParameters:
      Name  Flags
      in    

  private static int count(java.io.ByteArrayInputStream);
    descriptor: (Ljava/io/ByteArrayInputStream;)I
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.io.ByteArrayInputStream in
         0: .line 111
            aload 0 /* in */
            getstatic org.jruby.util.io.SeekableByteChannelImpl.countField:Ljava/lang/reflect/Field;
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.readIntField:(Ljava/io/ByteArrayInputStream;Ljava/lang/reflect/Field;)I
            ireturn
        end local 0 // java.io.ByteArrayInputStream in
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0    in  Ljava/io/ByteArrayInputStream;
    MethodParameters:
      Name  Flags
      in    

  private static int mark(java.io.ByteArrayInputStream);
    descriptor: (Ljava/io/ByteArrayInputStream;)I
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.io.ByteArrayInputStream in
         0: .line 115
            aload 0 /* in */
            getstatic org.jruby.util.io.SeekableByteChannelImpl.markField:Ljava/lang/reflect/Field;
            invokestatic org.jruby.util.io.SeekableByteChannelImpl.readIntField:(Ljava/io/ByteArrayInputStream;Ljava/lang/reflect/Field;)I
            ireturn
        end local 0 // java.io.ByteArrayInputStream in
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0    in  Ljava/io/ByteArrayInputStream;
    MethodParameters:
      Name  Flags
      in    

  private static int readIntField(java.io.ByteArrayInputStream, java.lang.reflect.Field);
    descriptor: (Ljava/io/ByteArrayInputStream;Ljava/lang/reflect/Field;)I
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=3, locals=3, args_size=2
        start local 0 // java.io.ByteArrayInputStream self
        start local 1 // java.lang.reflect.Field field
         0: .line 120
            aload 1 /* field */
            aload 0 /* self */
            invokevirtual java.lang.reflect.Field.getInt:(Ljava/lang/Object;)I
         1: ireturn
         2: .line 122
      StackMap locals:
      StackMap stack: java.lang.IllegalAccessException
            astore 2 /* ex */
        start local 2 // java.lang.IllegalAccessException ex
         3: .line 124
            new java.lang.IllegalStateException
            dup
            aload 2 /* ex */
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 2 // java.lang.IllegalAccessException ex
        end local 1 // java.lang.reflect.Field field
        end local 0 // java.io.ByteArrayInputStream self
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    4     0   self  Ljava/io/ByteArrayInputStream;
            0    4     1  field  Ljava/lang/reflect/Field;
            3    4     2     ex  Ljava/lang/IllegalAccessException;
      Exception table:
        from    to  target  type
           0     1       2  Class java.lang.IllegalAccessException
    MethodParameters:
       Name  Flags
      self   
      field  

  private static java.lang.reflect.Field accessibleField(java.lang.String);
    descriptor: (Ljava/lang/String;)Ljava/lang/reflect/Field;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=2, locals=2, args_size=1
        start local 0 // java.lang.String name
         0: .line 149
            ldc Ljava/io/ByteArrayInputStream;
            aload 0 /* name */
            invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
            astore 1 /* field */
        start local 1 // java.lang.reflect.Field field
         1: .line 150
            aload 1 /* field */
            iconst_1
            invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
         2: .line 151
            aload 1 /* field */
         3: areturn
        end local 1 // java.lang.reflect.Field field
         4: .line 153
      StackMap locals:
      StackMap stack: java.lang.NoSuchFieldException
            pop
         5: .line 154
            aconst_null
            areturn
         6: .line 156
      StackMap locals:
      StackMap stack: java.lang.SecurityException
            pop
         7: .line 157
            aconst_null
            areturn
        end local 0 // java.lang.String name
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    8     0   name  Ljava/lang/String;
            1    4     1  field  Ljava/lang/reflect/Field;
      Exception table:
        from    to  target  type
           0     3       4  Class java.lang.NoSuchFieldException
           0     3       6  Class java.lang.SecurityException
    MethodParameters:
      Name  Flags
      name  final
}
SourceFile: "SeekableByteChannelImpl.java"