public class org.glassfish.grizzly.websockets.Utf8Utils
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.glassfish.grizzly.websockets.Utf8Utils
  super_class: java.lang.Object
{
  private static final byte[] EMPTY_ARRAY;
    descriptor: [B
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=1, locals=0, args_size=0
         0: .line 31
            iconst_0
            newarray 8
            putstatic org.glassfish.grizzly.websockets.Utf8Utils.EMPTY_ARRAY:[B
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  public void <init>();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.glassfish.grizzly.websockets.Utf8Utils this
         0: .line 30
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // org.glassfish.grizzly.websockets.Utf8Utils this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/glassfish/grizzly/websockets/Utf8Utils;

  public static byte[] encode(java.nio.charset.Charset, java.lang.String);
    descriptor: (Ljava/nio/charset/Charset;Ljava/lang/String;)[B
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=8, args_size=2
        start local 0 // java.nio.charset.Charset charset
        start local 1 // java.lang.String string
         0: .line 34
            aload 1 /* string */
            invokevirtual java.lang.String.length:()I
            ifne 2
         1: .line 35
            getstatic org.glassfish.grizzly.websockets.Utf8Utils.EMPTY_ARRAY:[B
            areturn
         2: .line 38
      StackMap locals:
      StackMap stack:
            aload 0 /* charset */
            invokestatic org.glassfish.grizzly.utils.Charsets.getCharsetEncoder:(Ljava/nio/charset/Charset;)Ljava/nio/charset/CharsetEncoder;
            astore 2 /* ce */
        start local 2 // java.nio.charset.CharsetEncoder ce
         3: .line 40
            aload 1 /* string */
            invokevirtual java.lang.String.length:()I
            aload 2 /* ce */
            invokevirtual java.nio.charset.CharsetEncoder.maxBytesPerChar:()F
            invokestatic org.glassfish.grizzly.websockets.Utf8Utils.scale:(IF)I
            istore 3 /* en */
        start local 3 // int en
         4: .line 41
            iload 3 /* en */
            newarray 8
            astore 4 /* ba */
        start local 4 // byte[] ba
         5: .line 43
            aload 2 /* ce */
            invokevirtual java.nio.charset.CharsetEncoder.reset:()Ljava/nio/charset/CharsetEncoder;
            pop
         6: .line 44
            aload 4 /* ba */
            invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
            astore 5 /* bb */
        start local 5 // java.nio.ByteBuffer bb
         7: .line 45
            aload 1 /* string */
            invokestatic java.nio.CharBuffer.wrap:(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;
            astore 6 /* cb */
        start local 6 // java.nio.CharBuffer cb
         8: .line 47
            aload 2 /* ce */
            aload 6 /* cb */
            aload 5 /* bb */
            iconst_1
            invokevirtual java.nio.charset.CharsetEncoder.encode:(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;
            astore 7 /* cr */
        start local 7 // java.nio.charset.CoderResult cr
         9: .line 48
            aload 7 /* cr */
            invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
            ifne 11
        10: .line 49
            aload 7 /* cr */
            invokevirtual java.nio.charset.CoderResult.throwException:()V
        11: .line 51
      StackMap locals: java.nio.charset.Charset java.lang.String java.nio.charset.CharsetEncoder int byte[] java.nio.ByteBuffer java.nio.CharBuffer java.nio.charset.CoderResult
      StackMap stack:
            aload 2 /* ce */
            aload 5 /* bb */
            invokevirtual java.nio.charset.CharsetEncoder.flush:(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;
            astore 7 /* cr */
        12: .line 52
            aload 7 /* cr */
            invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
            ifne 17
        13: .line 53
            aload 7 /* cr */
            invokevirtual java.nio.charset.CoderResult.throwException:()V
        end local 7 // java.nio.charset.CoderResult cr
        14: .line 55
            goto 17
      StackMap locals: java.nio.charset.Charset java.lang.String java.nio.charset.CharsetEncoder int byte[] java.nio.ByteBuffer java.nio.CharBuffer
      StackMap stack: java.nio.charset.CharacterCodingException
        15: astore 7 /* x */
        start local 7 // java.nio.charset.CharacterCodingException x
        16: .line 58
            new java.lang.Error
            dup
            aload 7 /* x */
            invokespecial java.lang.Error.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 7 // java.nio.charset.CharacterCodingException x
        17: .line 60
      StackMap locals:
      StackMap stack:
            aload 4 /* ba */
            aload 5 /* bb */
            invokevirtual java.nio.ByteBuffer.position:()I
            invokestatic org.glassfish.grizzly.websockets.Utf8Utils.safeTrim:([BI)[B
            areturn
        end local 6 // java.nio.CharBuffer cb
        end local 5 // java.nio.ByteBuffer bb
        end local 4 // byte[] ba
        end local 3 // int en
        end local 2 // java.nio.charset.CharsetEncoder ce
        end local 1 // java.lang.String string
        end local 0 // java.nio.charset.Charset charset
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   18     0  charset  Ljava/nio/charset/Charset;
            0   18     1   string  Ljava/lang/String;
            3   18     2       ce  Ljava/nio/charset/CharsetEncoder;
            4   18     3       en  I
            5   18     4       ba  [B
            7   18     5       bb  Ljava/nio/ByteBuffer;
            8   18     6       cb  Ljava/nio/CharBuffer;
            9   14     7       cr  Ljava/nio/charset/CoderResult;
           16   17     7        x  Ljava/nio/charset/CharacterCodingException;
      Exception table:
        from    to  target  type
           8    14      15  Class java.nio.charset.CharacterCodingException
    MethodParameters:
         Name  Flags
      charset  
      string   

  public static void encode(java.nio.charset.Charset, java.lang.String, java.io.OutputStream);
    descriptor: (Ljava/nio/charset/Charset;Ljava/lang/String;Ljava/io/OutputStream;)V
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=9, args_size=3
        start local 0 // java.nio.charset.Charset charset
        start local 1 // java.lang.String string
        start local 2 // java.io.OutputStream os
         0: .line 65
            aload 1 /* string */
            invokevirtual java.lang.String.length:()I
            ifne 2
         1: .line 66
            return
         2: .line 69
      StackMap locals:
      StackMap stack:
            aload 0 /* charset */
            invokestatic org.glassfish.grizzly.utils.Charsets.getCharsetEncoder:(Ljava/nio/charset/Charset;)Ljava/nio/charset/CharsetEncoder;
            astore 3 /* ce */
        start local 3 // java.nio.charset.CharsetEncoder ce
         3: .line 70
            aload 1 /* string */
            invokevirtual java.lang.String.length:()I
            aload 3 /* ce */
            invokevirtual java.nio.charset.CharsetEncoder.maxBytesPerChar:()F
            invokestatic org.glassfish.grizzly.websockets.Utf8Utils.scale:(IF)I
            istore 4 /* en */
        start local 4 // int en
         4: .line 71
            iload 4 /* en */
            newarray 8
            astore 5 /* ba */
        start local 5 // byte[] ba
         5: .line 73
            aload 3 /* ce */
            invokevirtual java.nio.charset.CharsetEncoder.reset:()Ljava/nio/charset/CharsetEncoder;
            pop
         6: .line 74
            aload 5 /* ba */
            invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
            astore 6 /* bb */
        start local 6 // java.nio.ByteBuffer bb
         7: .line 75
            aload 1 /* string */
            invokestatic java.nio.CharBuffer.wrap:(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;
            astore 7 /* cb */
        start local 7 // java.nio.CharBuffer cb
         8: .line 77
            aload 3 /* ce */
            aload 7 /* cb */
            aload 6 /* bb */
            iconst_1
            invokevirtual java.nio.charset.CharsetEncoder.encode:(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;
            astore 8 /* cr */
        start local 8 // java.nio.charset.CoderResult cr
         9: .line 78
            aload 8 /* cr */
            invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
            ifne 11
        10: .line 79
            aload 8 /* cr */
            invokevirtual java.nio.charset.CoderResult.throwException:()V
        11: .line 81
      StackMap locals: java.nio.charset.Charset java.lang.String java.io.OutputStream java.nio.charset.CharsetEncoder int byte[] java.nio.ByteBuffer java.nio.CharBuffer java.nio.charset.CoderResult
      StackMap stack:
            aload 3 /* ce */
            aload 6 /* bb */
            invokevirtual java.nio.charset.CharsetEncoder.flush:(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;
            astore 8 /* cr */
        12: .line 82
            aload 8 /* cr */
            invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
            ifne 17
        13: .line 83
            aload 8 /* cr */
            invokevirtual java.nio.charset.CoderResult.throwException:()V
        end local 8 // java.nio.charset.CoderResult cr
        14: .line 85
            goto 17
      StackMap locals: java.nio.charset.Charset java.lang.String java.io.OutputStream java.nio.charset.CharsetEncoder int byte[] java.nio.ByteBuffer java.nio.CharBuffer
      StackMap stack: java.nio.charset.CharacterCodingException
        15: astore 8 /* x */
        start local 8 // java.nio.charset.CharacterCodingException x
        16: .line 88
            new java.lang.Error
            dup
            aload 8 /* x */
            invokespecial java.lang.Error.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 8 // java.nio.charset.CharacterCodingException x
        17: .line 91
      StackMap locals:
      StackMap stack:
            aload 2 /* os */
            aload 5 /* ba */
            iconst_0
            aload 6 /* bb */
            invokevirtual java.nio.ByteBuffer.position:()I
            invokevirtual java.io.OutputStream.write:([BII)V
        18: .line 92
            return
        end local 7 // java.nio.CharBuffer cb
        end local 6 // java.nio.ByteBuffer bb
        end local 5 // byte[] ba
        end local 4 // int en
        end local 3 // java.nio.charset.CharsetEncoder ce
        end local 2 // java.io.OutputStream os
        end local 1 // java.lang.String string
        end local 0 // java.nio.charset.Charset charset
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   19     0  charset  Ljava/nio/charset/Charset;
            0   19     1   string  Ljava/lang/String;
            0   19     2       os  Ljava/io/OutputStream;
            3   19     3       ce  Ljava/nio/charset/CharsetEncoder;
            4   19     4       en  I
            5   19     5       ba  [B
            7   19     6       bb  Ljava/nio/ByteBuffer;
            8   19     7       cb  Ljava/nio/CharBuffer;
            9   14     8       cr  Ljava/nio/charset/CoderResult;
           16   17     8        x  Ljava/nio/charset/CharacterCodingException;
      Exception table:
        from    to  target  type
           8    14      15  Class java.nio.charset.CharacterCodingException
    Exceptions:
      throws java.io.IOException
    MethodParameters:
         Name  Flags
      charset  
      string   
      os       

  private static int scale(int, float);
    descriptor: (IF)I
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // int len
        start local 1 // float expansionFactor
         0: .line 97
            iload 0 /* len */
            i2d
            fload 1 /* expansionFactor */
            f2d
            dmul
            d2i
            ireturn
        end local 1 // float expansionFactor
        end local 0 // int len
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0    1     0              len  I
            0    1     1  expansionFactor  F
    MethodParameters:
                 Name  Flags
      len              
      expansionFactor  

  private static byte[] safeTrim(byte[], int);
    descriptor: ([BI)[B
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=2, locals=2, args_size=2
        start local 0 // byte[] ba
        start local 1 // int len
         0: .line 103
            iload 1 /* len */
            aload 0 /* ba */
            arraylength
            if_icmpne 2
            invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
            ifnonnull 2
         1: .line 104
            aload 0 /* ba */
            areturn
         2: .line 106
      StackMap locals:
      StackMap stack:
            aload 0 /* ba */
            iload 1 /* len */
            invokestatic org.glassfish.grizzly.websockets.Utf8Utils.copyOf:([BI)[B
            areturn
        end local 1 // int len
        end local 0 // byte[] ba
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0    ba  [B
            0    3     1   len  I
    MethodParameters:
      Name  Flags
      ba    
      len   

  private static byte[] copyOf(byte[], int);
    descriptor: ([BI)[B
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=6, locals=3, args_size=2
        start local 0 // byte[] original
        start local 1 // int newLength
         0: .line 111
            iload 1 /* newLength */
            newarray 8
            astore 2 /* copy */
        start local 2 // byte[] copy
         1: .line 112
            aload 0 /* original */
            iconst_0
            aload 2 /* copy */
            iconst_0
            aload 0 /* original */
            arraylength
            iload 1 /* newLength */
            invokestatic java.lang.Math.min:(II)I
            invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
         2: .line 113
            aload 2 /* copy */
            areturn
        end local 2 // byte[] copy
        end local 1 // int newLength
        end local 0 // byte[] original
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    3     0   original  [B
            0    3     1  newLength  I
            1    3     2       copy  [B
    MethodParameters:
           Name  Flags
      original   
      newLength  
}
SourceFile: "Utf8Utils.java"