class org.bouncycastle.asn1.StreamUtil
  minor version: 0
  major version: 59
  flags: flags: (0x0020) ACC_SUPER
  this_class: org.bouncycastle.asn1.StreamUtil
  super_class: java.lang.Object
{
  private static final long MAX_MEMORY;
    descriptor: J
    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 11
            invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
            invokevirtual java.lang.Runtime.maxMemory:()J
            putstatic org.bouncycastle.asn1.StreamUtil.MAX_MEMORY:J
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  void <init>();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.bouncycastle.asn1.StreamUtil this
         0: .line 9
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // org.bouncycastle.asn1.StreamUtil this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/bouncycastle/asn1/StreamUtil;

  static int findLimit(java.io.InputStream);
    descriptor: (Ljava/io/InputStream;)I
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=4, args_size=1
        start local 0 // java.io.InputStream in
         0: .line 21
            aload 0 /* in */
            instanceof org.bouncycastle.asn1.LimitedInputStream
            ifeq 2
         1: .line 23
            aload 0 /* in */
            checkcast org.bouncycastle.asn1.LimitedInputStream
            invokevirtual org.bouncycastle.asn1.LimitedInputStream.getRemaining:()I
            ireturn
         2: .line 25
      StackMap locals:
      StackMap stack:
            aload 0 /* in */
            instanceof org.bouncycastle.asn1.ASN1InputStream
            ifeq 4
         3: .line 27
            aload 0 /* in */
            checkcast org.bouncycastle.asn1.ASN1InputStream
            invokevirtual org.bouncycastle.asn1.ASN1InputStream.getLimit:()I
            ireturn
         4: .line 29
      StackMap locals:
      StackMap stack:
            aload 0 /* in */
            instanceof java.io.ByteArrayInputStream
            ifeq 6
         5: .line 31
            aload 0 /* in */
            checkcast java.io.ByteArrayInputStream
            invokevirtual java.io.ByteArrayInputStream.available:()I
            ireturn
         6: .line 33
      StackMap locals:
      StackMap stack:
            aload 0 /* in */
            instanceof java.io.FileInputStream
            ifeq 15
         7: .line 37
            aload 0 /* in */
            checkcast java.io.FileInputStream
            invokevirtual java.io.FileInputStream.getChannel:()Ljava/nio/channels/FileChannel;
            astore 1 /* channel */
        start local 1 // java.nio.channels.FileChannel channel
         8: .line 38
            aload 1 /* channel */
            ifnull 9
            aload 1 /* channel */
            invokevirtual java.nio.channels.FileChannel.size:()J
            goto 10
      StackMap locals: java.nio.channels.FileChannel
      StackMap stack:
         9: ldc 2147483647
      StackMap locals:
      StackMap stack: long
        10: lstore 2 /* size */
        start local 2 // long size
        11: .line 40
            lload 2 /* size */
            ldc 2147483647
            lcmp
            ifge 15
        12: .line 42
            lload 2 /* size */
            l2i
        13: ireturn
        end local 2 // long size
        end local 1 // java.nio.channels.FileChannel channel
        14: .line 45
      StackMap locals: java.io.InputStream
      StackMap stack: java.io.IOException
            pop
        15: .line 51
      StackMap locals:
      StackMap stack:
            getstatic org.bouncycastle.asn1.StreamUtil.MAX_MEMORY:J
            ldc 2147483647
            lcmp
            ifle 17
        16: .line 53
            ldc 2147483647
            ireturn
        17: .line 56
      StackMap locals:
      StackMap stack:
            getstatic org.bouncycastle.asn1.StreamUtil.MAX_MEMORY:J
            l2i
            ireturn
        end local 0 // java.io.InputStream in
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   18     0       in  Ljava/io/InputStream;
            8   14     1  channel  Ljava/nio/channels/FileChannel;
           11   14     2     size  J
      Exception table:
        from    to  target  type
           7    13      14  Class java.io.IOException
    MethodParameters:
      Name  Flags
      in    

  static int calculateBodyLength(int);
    descriptor: (I)I
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=5, args_size=1
        start local 0 // int length
         0: .line 62
            iconst_1
            istore 1 /* count */
        start local 1 // int count
         1: .line 64
            iload 0 /* length */
            bipush 127
            if_icmple 12
         2: .line 66
            iconst_1
            istore 2 /* size */
        start local 2 // int size
         3: .line 67
            iload 0 /* length */
            istore 3 /* val */
        start local 3 // int val
         4: .line 69
            goto 6
         5: .line 71
      StackMap locals: int int int
      StackMap stack:
            iinc 2 /* size */ 1
         6: .line 69
      StackMap locals:
      StackMap stack:
            iload 3 /* val */
            bipush 8
            iushr
            dup
            istore 3 /* val */
            ifne 5
         7: .line 74
            iload 2 /* size */
            iconst_1
            isub
            bipush 8
            imul
            istore 4 /* i */
        start local 4 // int i
         8: goto 11
         9: .line 76
      StackMap locals: int
      StackMap stack:
            iinc 1 /* count */ 1
        10: .line 74
            iinc 4 /* i */ -8
      StackMap locals:
      StackMap stack:
        11: iload 4 /* i */
            ifge 9
        end local 4 // int i
        end local 3 // int val
        end local 2 // int size
        12: .line 80
      StackMap locals:
      StackMap stack:
            iload 1 /* count */
            ireturn
        end local 1 // int count
        end local 0 // int length
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   13     0  length  I
            1   13     1   count  I
            3   12     2    size  I
            4   12     3     val  I
            8   12     4       i  I
    MethodParameters:
        Name  Flags
      length  

  static int calculateTagLength(int);
    descriptor: (I)I
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=4, args_size=1
        start local 0 // int tagNo
         0: .line 86
            iconst_1
            istore 1 /* length */
        start local 1 // int length
         1: .line 88
            iload 0 /* tagNo */
            bipush 31
            if_icmplt 13
         2: .line 90
            iload 0 /* tagNo */
            sipush 128
            if_icmpge 5
         3: .line 92
            iinc 1 /* length */ 1
         4: .line 93
            goto 13
         5: .line 96
      StackMap locals: int
      StackMap stack:
            iconst_5
            newarray 8
            astore 2 /* stack */
        start local 2 // byte[] stack
         6: .line 97
            aload 2 /* stack */
            arraylength
            istore 3 /* pos */
        start local 3 // int pos
         7: .line 99
            aload 2 /* stack */
            iinc 3 /* pos */ -1
            iload 3 /* pos */
            iload 0 /* tagNo */
            bipush 127
            iand
            i2b
            bastore
         8: .line 103
      StackMap locals: byte[] int
      StackMap stack:
            iload 0 /* tagNo */
            bipush 7
            ishr
            istore 0 /* tagNo */
         9: .line 104
            aload 2 /* stack */
            iinc 3 /* pos */ -1
            iload 3 /* pos */
            iload 0 /* tagNo */
            bipush 127
            iand
            sipush 128
            ior
            i2b
            bastore
        10: .line 106
            iload 0 /* tagNo */
            bipush 127
        11: .line 101
            if_icmpgt 8
        12: .line 108
            iload 1 /* length */
            aload 2 /* stack */
            arraylength
            iload 3 /* pos */
            isub
            iadd
            istore 1 /* length */
        end local 3 // int pos
        end local 2 // byte[] stack
        13: .line 112
      StackMap locals:
      StackMap stack:
            iload 1 /* length */
            ireturn
        end local 1 // int length
        end local 0 // int tagNo
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   14     0   tagNo  I
            1   14     1  length  I
            6   13     2   stack  [B
            7   13     3     pos  I
    Exceptions:
      throws java.io.IOException
    MethodParameters:
       Name  Flags
      tagNo  
}
SourceFile: "StreamUtil.java"