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 start local 1 0: aload 0
aload 1
aconst_null
invokespecial org.jruby.embed.io.WriterOutputStream.<init>:(Ljava/io/Writer;Ljava/lang/String;)V
1: return
end local 1 end local 0 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 start local 1 start local 2 0: aload 0
invokespecial java.io.OutputStream.<init>:()V
1: aload 0
iconst_1
putfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
2: aload 0
aload 1
putfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
3: aload 2
ifnonnull 5
aload 1
instanceof java.io.OutputStreamWriter
ifeq 5
4: aload 1
checkcast java.io.OutputStreamWriter
invokevirtual java.io.OutputStreamWriter.getEncoding:()Ljava/lang/String;
astore 2
5: StackMap locals: org.jruby.embed.io.WriterOutputStream java.io.Writer java.lang.String
StackMap stack:
aload 2
ifnonnull 8
6: invokestatic java.nio.charset.Charset.defaultCharset:()Ljava/nio/charset/Charset;
invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
astore 2
7: goto 10
StackMap locals:
StackMap stack:
8: aload 2
invokestatic java.nio.charset.Charset.isSupported:(Ljava/lang/String;)Z
ifne 10
9: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
aload 2
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: StackMap locals:
StackMap stack:
aload 0
aload 2
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: aload 0
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: aload 0
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: return
end local 2 end local 1 end local 0 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 0: aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
dup
astore 1
monitorenter
1: aload 0
getfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
ifne 3
2: new java.io.IOException
dup
ldc "This stream has been already closed."
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.io.Writer
StackMap stack:
aload 0
iconst_0
putfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
4: aload 0
aconst_null
putfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
5: aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
invokevirtual java.io.Writer.close:()V
6: aload 1
monitorexit
7: goto 10
StackMap locals:
StackMap stack: java.lang.Throwable
8: aload 1
monitorexit
9: athrow
10: StackMap locals:
StackMap stack:
return
end local 0 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 0: aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
dup
astore 1
monitorenter
1: aload 0
getfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
ifne 4
2: aload 1
monitorexit
3: return
4: StackMap locals: java.io.Writer
StackMap stack:
aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
invokevirtual java.io.Writer.flush:()V
5: aload 1
monitorexit
6: goto 9
StackMap locals:
StackMap stack: java.lang.Throwable
7: aload 1
monitorexit
8: athrow
9: StackMap locals:
StackMap stack:
return
end local 0 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 start local 1 0: iconst_1
newarray 8
dup
iconst_0
iload 1
i2b
bastore
astore 2
start local 2 1: aload 0
aload 2
iconst_0
iconst_1
invokevirtual org.jruby.embed.io.WriterOutputStream.write:([BII)V
2: return
end local 2 end local 1 end local 0 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 start local 1 0: aload 0
aload 1
iconst_0
aload 1
arraylength
invokevirtual org.jruby.embed.io.WriterOutputStream.write:([BII)V
1: return
end local 1 end local 0 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 start local 1 start local 2 start local 3 0: aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
dup
astore 4
monitorenter
1: aload 0
getfield org.jruby.embed.io.WriterOutputStream.isOpen:Z
ifne 4
2: aload 4
monitorexit
3: return
4: StackMap locals: java.io.Writer
StackMap stack:
iload 2
iflt 5
iload 3
ifle 5
iload 2
iload 3
iadd
aload 1
arraylength
if_icmple 6
5: StackMap locals:
StackMap stack:
new java.lang.IndexOutOfBoundsException
dup
invokespecial java.lang.IndexOutOfBoundsException.<init>:()V
athrow
6: StackMap locals:
StackMap stack:
aload 1
iload 2
iload 3
invokestatic java.nio.ByteBuffer.wrap:([BII)Ljava/nio/ByteBuffer;
astore 5
start local 5 7: iload 3
invokestatic java.nio.CharBuffer.allocate:(I)Ljava/nio/CharBuffer;
astore 6
start local 6 8: aload 0
aload 5
aload 6
invokevirtual org.jruby.embed.io.WriterOutputStream.byte2char:(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)V
9: aload 6
invokevirtual java.nio.CharBuffer.length:()I
newarray 5
astore 7
start local 7 10: aload 6
aload 7
iconst_0
aload 6
invokevirtual java.nio.CharBuffer.length:()I
invokevirtual java.nio.CharBuffer.get:([CII)Ljava/nio/CharBuffer;
pop
11: aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
aload 7
invokevirtual java.io.Writer.write:([C)V
12: aload 0
getfield org.jruby.embed.io.WriterOutputStream.writer:Ljava/io/Writer;
invokevirtual java.io.Writer.flush:()V
end local 7 end local 6 end local 5 13: aload 4
monitorexit
14: goto 17
StackMap locals:
StackMap stack: java.lang.Throwable
15: aload 4
monitorexit
16: athrow
17: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 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 start local 1 start local 2 0: aload 0
getfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
invokevirtual java.nio.charset.CharsetDecoder.reset:()Ljava/nio/charset/CharsetDecoder;
pop
1: aload 2
invokestatic com.headius.backport9.buffer.Buffers.clearBuffer:(Ljava/nio/Buffer;)Ljava/nio/Buffer;
pop
2: aload 0
getfield org.jruby.embed.io.WriterOutputStream.decoder:Ljava/nio/charset/CharsetDecoder;
aload 1
aload 2
iconst_1
invokevirtual java.nio.charset.CharsetDecoder.decode:(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;Z)Ljava/nio/charset/CoderResult;
astore 3
start local 3 3: aload 3
invokevirtual java.nio.charset.CoderResult.isError:()Z
ifne 4
aload 3
invokevirtual java.nio.charset.CoderResult.isOverflow:()Z
ifeq 5
4: StackMap locals: java.nio.charset.CoderResult
StackMap stack:
new java.io.IOException
dup
aload 3
invokevirtual java.nio.charset.CoderResult.toString:()Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 3
invokevirtual java.nio.charset.CoderResult.isUnderflow:()Z
ifeq 7
6: aload 2
invokestatic com.headius.backport9.buffer.Buffers.flipBuffer:(Ljava/nio/Buffer;)Ljava/nio/Buffer;
pop
7: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 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"