public class org.h2.store.CountingReaderInputStream extends java.io.InputStream
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.h2.store.CountingReaderInputStream
  super_class: java.io.InputStream
{
  private final java.io.Reader reader;
    descriptor: Ljava/io/Reader;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.nio.CharBuffer charBuffer;
    descriptor: Ljava/nio/CharBuffer;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.nio.charset.CharsetEncoder encoder;
    descriptor: Ljava/nio/charset/CharsetEncoder;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private java.nio.ByteBuffer byteBuffer;
    descriptor: Ljava/nio/ByteBuffer;
    flags: (0x0002) ACC_PRIVATE

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

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

  void <init>(java.io.Reader, long);
    descriptor: (Ljava/io/Reader;J)V
    flags: (0x0000) 
    Code:
      stack=3, locals=4, args_size=3
        start local 0 // org.h2.store.CountingReaderInputStream this
        start local 1 // java.io.Reader reader
        start local 2 // long maxLength
         0: .line 38
            aload 0 /* this */
            invokespecial java.io.InputStream.<init>:()V
         1: .line 27
            aload 0 /* this */
         2: .line 28
            sipush 4096
            invokestatic java.nio.CharBuffer.allocate:(I)Ljava/nio/CharBuffer;
            putfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
         3: .line 30
            aload 0 /* this */
            getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
            invokevirtual java.nio.charset.Charset.newEncoder:()Ljava/nio/charset/CharsetEncoder;
         4: .line 31
            getstatic java.nio.charset.CodingErrorAction.REPLACE:Ljava/nio/charset/CodingErrorAction;
            invokevirtual java.nio.charset.CharsetEncoder.onMalformedInput:(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
         5: .line 32
            getstatic java.nio.charset.CodingErrorAction.REPLACE:Ljava/nio/charset/CodingErrorAction;
            invokevirtual java.nio.charset.CharsetEncoder.onUnmappableCharacter:(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
            putfield org.h2.store.CountingReaderInputStream.encoder:Ljava/nio/charset/CharsetEncoder;
         6: .line 34
            aload 0 /* this */
            iconst_0
            invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
            putfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
         7: .line 39
            aload 0 /* this */
            aload 1 /* reader */
            putfield org.h2.store.CountingReaderInputStream.reader:Ljava/io/Reader;
         8: .line 40
            aload 0 /* this */
            lload 2 /* maxLength */
            putfield org.h2.store.CountingReaderInputStream.remaining:J
         9: .line 41
            return
        end local 2 // long maxLength
        end local 1 // java.io.Reader reader
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   10     0       this  Lorg/h2/store/CountingReaderInputStream;
            0   10     1     reader  Ljava/io/Reader;
            0   10     2  maxLength  J
    MethodParameters:
           Name  Flags
      reader     
      maxLength  

  public int read(byte[], int, int);
    descriptor: ([BII)I
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=4, args_size=4
        start local 0 // org.h2.store.CountingReaderInputStream this
        start local 1 // byte[] buff
        start local 2 // int offset
        start local 3 // int len
         0: .line 45
            aload 0 /* this */
            invokevirtual org.h2.store.CountingReaderInputStream.fetch:()Z
            ifne 2
         1: .line 46
            iconst_m1
            ireturn
         2: .line 48
      StackMap locals:
      StackMap stack:
            iload 3 /* len */
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.remaining:()I
            invokestatic java.lang.Math.min:(II)I
            istore 3 /* len */
         3: .line 49
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            aload 1 /* buff */
            iload 2 /* offset */
            iload 3 /* len */
            invokevirtual java.nio.ByteBuffer.get:([BII)Ljava/nio/ByteBuffer;
            pop
         4: .line 50
            iload 3 /* len */
            ireturn
        end local 3 // int len
        end local 2 // int offset
        end local 1 // byte[] buff
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0    this  Lorg/h2/store/CountingReaderInputStream;
            0    5     1    buff  [B
            0    5     2  offset  I
            0    5     3     len  I
    Exceptions:
      throws java.io.IOException
    MethodParameters:
        Name  Flags
      buff    
      offset  
      len     

  public int read();
    descriptor: ()I
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // org.h2.store.CountingReaderInputStream this
         0: .line 55
            aload 0 /* this */
            invokevirtual org.h2.store.CountingReaderInputStream.fetch:()Z
            ifne 2
         1: .line 56
            iconst_m1
            ireturn
         2: .line 58
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.get:()B
            sipush 255
            iand
            ireturn
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Lorg/h2/store/CountingReaderInputStream;
    Exceptions:
      throws java.io.IOException

  private boolean fetch();
    descriptor: ()Z
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.h2.store.CountingReaderInputStream this
         0: .line 62
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            ifnull 2
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.remaining:()I
            ifne 2
         1: .line 63
            aload 0 /* this */
            invokevirtual org.h2.store.CountingReaderInputStream.fillBuffer:()V
         2: .line 65
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            ifnull 3
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
         3: iconst_0
            ireturn
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    4     0  this  Lorg/h2/store/CountingReaderInputStream;
    Exceptions:
      throws java.io.IOException

  private void fillBuffer();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=5, locals=3, args_size=1
        start local 0 // org.h2.store.CountingReaderInputStream this
         0: .line 69
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.capacity:()I
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.position:()I
            isub
            i2l
         1: .line 70
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.remaining:J
         2: .line 69
            invokestatic java.lang.Math.min:(JJ)J
            l2i
            istore 1 /* len */
        start local 1 // int len
         3: .line 71
            iload 1 /* len */
            ifle 5
         4: .line 72
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.reader:Ljava/io/Reader;
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.array:()[C
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.position:()I
            iload 1 /* len */
            invokevirtual java.io.Reader.read:([CII)I
            istore 1 /* len */
         5: .line 74
      StackMap locals: int
      StackMap stack:
            iload 1 /* len */
            ifle 8
         6: .line 75
            aload 0 /* this */
            dup
            getfield org.h2.store.CountingReaderInputStream.remaining:J
            iload 1 /* len */
            i2l
            lsub
            putfield org.h2.store.CountingReaderInputStream.remaining:J
         7: .line 76
            goto 10
         8: .line 77
      StackMap locals:
      StackMap stack:
            iconst_0
            istore 1 /* len */
         9: .line 78
            aload 0 /* this */
            lconst_0
            putfield org.h2.store.CountingReaderInputStream.remaining:J
        10: .line 80
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            dup
            getfield org.h2.store.CountingReaderInputStream.length:J
            iload 1 /* len */
            i2l
            ladd
            putfield org.h2.store.CountingReaderInputStream.length:J
        11: .line 81
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.position:()I
            iload 1 /* len */
            iadd
            invokevirtual java.nio.CharBuffer.limit:(I)Ljava/nio/Buffer;
            pop
        12: .line 82
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.rewind:()Ljava/nio/Buffer;
            pop
        13: .line 83
            aload 0 /* this */
            sipush 4096
            invokestatic java.nio.ByteBuffer.allocate:(I)Ljava/nio/ByteBuffer;
            putfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
        14: .line 84
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.remaining:J
            lconst_0
            lcmp
            ifne 15
            iconst_1
            goto 16
      StackMap locals:
      StackMap stack:
        15: iconst_0
      StackMap locals:
      StackMap stack: int
        16: istore 2 /* end */
        start local 2 // boolean end
        17: .line 85
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.encoder:Ljava/nio/charset/CharsetEncoder;
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            iload 2 /* end */
            invokevirtual java.nio.charset.CharsetEncoder.encode:(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;
            pop
        18: .line 86
            iload 2 /* end */
            ifeq 21
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.position:()I
            ifne 21
        19: .line 88
            aload 0 /* this */
            aconst_null
            putfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
        20: .line 89
            return
        21: .line 91
      StackMap locals: int
      StackMap stack:
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.byteBuffer:Ljava/nio/ByteBuffer;
            invokevirtual java.nio.ByteBuffer.flip:()Ljava/nio/Buffer;
            pop
        22: .line 92
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.compact:()Ljava/nio/CharBuffer;
            pop
        23: .line 93
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.flip:()Ljava/nio/Buffer;
            pop
        24: .line 94
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.charBuffer:Ljava/nio/CharBuffer;
            invokevirtual java.nio.CharBuffer.limit:()I
            invokevirtual java.nio.CharBuffer.position:(I)Ljava/nio/Buffer;
            pop
        25: .line 95
            return
        end local 2 // boolean end
        end local 1 // int len
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   26     0  this  Lorg/h2/store/CountingReaderInputStream;
            3   26     1   len  I
           17   26     2   end  Z
    Exceptions:
      throws java.io.IOException

  public long getLength();
    descriptor: ()J
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // org.h2.store.CountingReaderInputStream this
         0: .line 104
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.length:J
            lreturn
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/h2/store/CountingReaderInputStream;

  public void close();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.h2.store.CountingReaderInputStream this
         0: .line 109
            aload 0 /* this */
            getfield org.h2.store.CountingReaderInputStream.reader:Ljava/io/Reader;
            invokevirtual java.io.Reader.close:()V
         1: .line 110
            return
        end local 0 // org.h2.store.CountingReaderInputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Lorg/h2/store/CountingReaderInputStream;
    Exceptions:
      throws java.io.IOException
}
SourceFile: "CountingReaderInputStream.java"