public class org.jruby.embed.io.WriterOutputStream extends java.io.OutputStream
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.jruby.embed.io.WriterOutputStream
  super_class: java.io.OutputStream
{
  private final java.io.Writer writer;
    descriptor: Ljava/io/Writer;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private boolean isOpen;
    descriptor: Z
    flags: (0x0002) ACC_PRIVATE

  private java.nio.charset.CharsetDecoder decoder;
    descriptor: Ljava/nio/charset/CharsetDecoder;
    flags: (0x0002) ACC_PRIVATE

  public void <init>(java.io.Writer);
    descriptor: (Ljava/io/Writer;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // org.jruby.embed.io.WriterOutputStream this
        start local 1 // java.io.Writer writer
         0: .line 63
            aload 0 /* this */
            aload 1 /* writer */
            aconst_null
            invokespecial org.jruby.embed.io.WriterOutputStream.<init>:(Ljava/io/Writer;Ljava/lang/String;)V
         1: .line 64
            return
        end local 1 // java.io.Writer writer
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    2     0    this  Lorg/jruby/embed/io/WriterOutputStream;
            0    2     1  writer  Ljava/io/Writer;
    MethodParameters:
        Name  Flags
      writer  

  public void <init>(java.io.Writer, java.lang.String);
    descriptor: (Ljava/io/Writer;Ljava/lang/String;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=3, args_size=3
        start local 0 // org.jruby.embed.io.WriterOutputStream this
        start local 1 // java.io.Writer writer
        start local 2 // java.lang.String encoding
         0: .line 71
            aload 0 /* this */
            invokespecial java.io.OutputStream.<init>:()V
         1: .line 54
            aload 0 /* this */
            iconst_1
            putfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
         2: .line 72
            aload 0 /* this */
            aload 1 /* writer */
            putfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
         3: .line 73
            aload 2 /* encoding */
            ifnonnull 5
            aload 1 /* writer */
            instanceof java.io.OutputStreamWriter
            ifeq 5
         4: .line 75
            aload 1 /* writer */
            checkcast java.io.OutputStreamWriter
            invokevirtual java.io.OutputStreamWriter.getEncoding:()Ljava/lang/String;
            astore 2 /* encoding */
         5: .line 77
      StackMap locals: org.jruby.embed.io.WriterOutputStream java.io.Writer java.lang.String
      StackMap stack:
            aload 2 /* encoding */
            ifnonnull 8
         6: .line 78
            invokestatic java.nio.charset.Charset.defaultCharset:()Ljava/nio/charset/Charset;
            invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
            astore 2 /* encoding */
         7: .line 79
            goto 10
      StackMap locals:
      StackMap stack:
         8: aload 2 /* encoding */
            invokestatic java.nio.charset.Charset.isSupported:(Ljava/lang/String;)Z
            ifne 10
         9: .line 80
            new java.lang.IllegalArgumentException
            dup
            new java.lang.StringBuilder
            dup
            aload 2 /* encoding */
            invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            ldc " is not supported"
            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
        10: .line 82
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 2 /* encoding */
            invokestatic java.nio.charset.Charset.forName:(Ljava/lang/String;)Ljava/nio/charset/Charset;
            invokevirtual java.nio.charset.Charset.newDecoder:()Ljava/nio/charset/CharsetDecoder;
            putfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
        11: .line 83
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
            getstatic java.nio.charset.CodingErrorAction.REPLACE:Ljava/nio/charset/CodingErrorAction;
            invokevirtual java.nio.charset.CharsetDecoder.onMalformedInput:(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
            pop
        12: .line 84
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
            getstatic java.nio.charset.CodingErrorAction.REPLACE:Ljava/nio/charset/CodingErrorAction;
            invokevirtual java.nio.charset.CharsetDecoder.onUnmappableCharacter:(Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
            pop
        13: .line 85
            return
        end local 2 // java.lang.String encoding
        end local 1 // java.io.Writer writer
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   14     0      this  Lorg/jruby/embed/io/WriterOutputStream;
            0   14     1    writer  Ljava/io/Writer;
            0   14     2  encoding  Ljava/lang/String;
    MethodParameters:
          Name  Flags
      writer    
      encoding  

  public void close();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=2, args_size=1
        start local 0 // org.jruby.embed.io.WriterOutputStream this
         0: .line 98
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            dup
            astore 1
            monitorenter
         1: .line 99
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
            ifne 3
         2: .line 100
            new java.io.IOException
            dup
            ldc "This stream has been already closed."
            invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 102
      StackMap locals: java.io.Writer
      StackMap stack:
            aload 0 /* this */
            iconst_0
            putfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
         4: .line 103
            aload 0 /* this */
            aconst_null
            putfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
         5: .line 104
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            invokevirtual java.io.Writer.close:()V
         6: .line 98
            aload 1
            monitorexit
         7: goto 10
      StackMap locals:
      StackMap stack: java.lang.Throwable
         8: aload 1
            monitorexit
         9: athrow
        10: .line 106
      StackMap locals:
      StackMap stack:
            return
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   11     0  this  Lorg/jruby/embed/io/WriterOutputStream;
      Exception table:
        from    to  target  type
           1     7       8  any
           8     9       8  any
    Exceptions:
      throws java.io.IOException

  public void flush();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=2, args_size=1
        start local 0 // org.jruby.embed.io.WriterOutputStream this
         0: .line 127
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            dup
            astore 1
            monitorenter
         1: .line 128
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
            ifne 4
         2: .line 129
            aload 1
            monitorexit
         3: return
         4: .line 131
      StackMap locals: java.io.Writer
      StackMap stack:
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            invokevirtual java.io.Writer.flush:()V
         5: .line 127
            aload 1
            monitorexit
         6: goto 9
      StackMap locals:
      StackMap stack: java.lang.Throwable
         7: aload 1
            monitorexit
         8: athrow
         9: .line 133
      StackMap locals:
      StackMap stack:
            return
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   10     0  this  Lorg/jruby/embed/io/WriterOutputStream;
      Exception table:
        from    to  target  type
           1     3       7  any
           4     6       7  any
           7     8       7  any
    Exceptions:
      throws java.io.IOException

  public void write(int);
    descriptor: (I)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=3, args_size=2
        start local 0 // org.jruby.embed.io.WriterOutputStream this
        start local 1 // int b
         0: .line 149
            iconst_1
            newarray 8
            dup
            iconst_0
            iload 1 /* b */
            i2b
            bastore
            astore 2 /* bb */
        start local 2 // byte[] bb
         1: .line 150
            aload 0 /* this */
            aload 2 /* bb */
            iconst_0
            iconst_1
            invokevirtual org.jruby.embed.io.WriterOutputStream.write:([BII)V
         2: .line 151
            return
        end local 2 // byte[] bb
        end local 1 // int b
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0  this  Lorg/jruby/embed/io/WriterOutputStream;
            0    3     1     b  I
            1    3     2    bb  [B
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      b     

  public void write(byte[]);
    descriptor: ([B)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // org.jruby.embed.io.WriterOutputStream this
        start local 1 // byte[] b
         0: .line 165
            aload 0 /* this */
            aload 1 /* b */
            iconst_0
            aload 1 /* b */
            arraylength
            invokevirtual org.jruby.embed.io.WriterOutputStream.write:([BII)V
         1: .line 166
            return
        end local 1 // byte[] b
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Lorg/jruby/embed/io/WriterOutputStream;
            0    2     1     b  [B
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      b     

  public void write(byte[], int, int);
    descriptor: ([BII)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=8, args_size=4
        start local 0 // org.jruby.embed.io.WriterOutputStream this
        start local 1 // byte[] b
        start local 2 // int off
        start local 3 // int len
         0: .line 190
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            dup
            astore 4
            monitorenter
         1: .line 191
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
            ifne 4
         2: .line 192
            aload 4
            monitorexit
         3: return
         4: .line 194
      StackMap locals: java.io.Writer
      StackMap stack:
            iload 2 /* off */
            iflt 5
            iload 3 /* len */
            ifle 5
            iload 2 /* off */
            iload 3 /* len */
            iadd
            aload 1 /* b */
            arraylength
            if_icmple 6
         5: .line 195
      StackMap locals:
      StackMap stack:
            new java.lang.IndexOutOfBoundsException
            dup
            invokespecial java.lang.IndexOutOfBoundsException.<init>:()V
            athrow
         6: .line 197
      StackMap locals:
      StackMap stack:
            aload 1 /* b */
            iload 2 /* off */
            iload 3 /* len */
            invokestatic java.nio.ByteBuffer.wrap:([BII)Ljava/nio/ByteBuffer;
            astore 5 /* bytes */
        start local 5 // java.nio.ByteBuffer bytes
         7: .line 198
            iload 3 /* len */
            invokestatic java.nio.CharBuffer.allocate:(I)Ljava/nio/CharBuffer;
            astore 6 /* chars */
        start local 6 // java.nio.CharBuffer chars
         8: .line 199
            aload 0 /* this */
            aload 5 /* bytes */
            aload 6 /* chars */
            invokevirtual org.jruby.embed.io.WriterOutputStream.byte2char:(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)V
         9: .line 200
            aload 6 /* chars */
            invokevirtual java.nio.CharBuffer.length:()I
            newarray 5
            astore 7 /* cbuf */
        start local 7 // char[] cbuf
        10: .line 201
            aload 6 /* chars */
            aload 7 /* cbuf */
            iconst_0
            aload 6 /* chars */
            invokevirtual java.nio.CharBuffer.length:()I
            invokevirtual java.nio.CharBuffer.get:([CII)Ljava/nio/CharBuffer;
            pop
        11: .line 202
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            aload 7 /* cbuf */
            invokevirtual java.io.Writer.write:([C)V
        12: .line 203
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
            invokevirtual java.io.Writer.flush:()V
        end local 7 // char[] cbuf
        end local 6 // java.nio.CharBuffer chars
        end local 5 // java.nio.ByteBuffer bytes
        13: .line 190
            aload 4
            monitorexit
        14: goto 17
      StackMap locals:
      StackMap stack: java.lang.Throwable
        15: aload 4
            monitorexit
        16: athrow
        17: .line 205
      StackMap locals:
      StackMap stack:
            return
        end local 3 // int len
        end local 2 // int off
        end local 1 // byte[] b
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0   18     0   this  Lorg/jruby/embed/io/WriterOutputStream;
            0   18     1      b  [B
            0   18     2    off  I
            0   18     3    len  I
            7   13     5  bytes  Ljava/nio/ByteBuffer;
            8   13     6  chars  Ljava/nio/CharBuffer;
           10   13     7   cbuf  [C
      Exception table:
        from    to  target  type
           1     3      15  any
           4    14      15  any
          15    16      15  any
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      b     
      off   
      len   

  private void byte2char(java.nio.ByteBuffer, java.nio.CharBuffer);
    descriptor: (Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=4, args_size=3
        start local 0 // org.jruby.embed.io.WriterOutputStream this
        start local 1 // java.nio.ByteBuffer bytes
        start local 2 // java.nio.CharBuffer chars
         0: .line 208
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
            invokevirtual java.nio.charset.CharsetDecoder.reset:()Ljava/nio/charset/CharsetDecoder;
            pop
         1: .line 209
            aload 2 /* chars */
            invokestatic com.headius.backport9.buffer.Buffers.clearBuffer:(Ljava/nio/Buffer;)Ljava/nio/Buffer;
            pop
         2: .line 210
            aload 0 /* this */
            getfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
            aload 1 /* bytes */
            aload 2 /* chars */
            iconst_1
            invokevirtual java.nio.charset.CharsetDecoder.decode:(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;Z)Ljava/nio/charset/CoderResult;
            astore 3 /* result */
        start local 3 // java.nio.charset.CoderResult result
         3: .line 211
            aload 3 /* result */
            invokevirtual java.nio.charset.CoderResult.isError:()Z
            ifne 4
            aload 3 /* result */
            invokevirtual java.nio.charset.CoderResult.isOverflow:()Z
            ifeq 5
         4: .line 212
      StackMap locals: java.nio.charset.CoderResult
      StackMap stack:
            new java.io.IOException
            dup
            aload 3 /* result */
            invokevirtual java.nio.charset.CoderResult.toString:()Ljava/lang/String;
            invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
            athrow
         5: .line 213
      StackMap locals:
      StackMap stack:
            aload 3 /* result */
            invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
            ifeq 7
         6: .line 214
            aload 2 /* chars */
            invokestatic com.headius.backport9.buffer.Buffers.flipBuffer:(Ljava/nio/Buffer;)Ljava/nio/Buffer;
            pop
         7: .line 216
      StackMap locals:
      StackMap stack:
            return
        end local 3 // java.nio.charset.CoderResult result
        end local 2 // java.nio.CharBuffer chars
        end local 1 // java.nio.ByteBuffer bytes
        end local 0 // org.jruby.embed.io.WriterOutputStream this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    8     0    this  Lorg/jruby/embed/io/WriterOutputStream;
            0    8     1   bytes  Ljava/nio/ByteBuffer;
            0    8     2   chars  Ljava/nio/CharBuffer;
            3    8     3  result  Ljava/nio/charset/CoderResult;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
       Name  Flags
      bytes  
      chars  
}
SourceFile: "WriterOutputStream.java"