public abstract class org.jruby.util.IOChannel implements java.nio.channels.Channel
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: org.jruby.util.IOChannel
super_class: java.lang.Object
{
private final org.jruby.runtime.builtin.IRubyObject io;
descriptor: Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.runtime.CallSite closeAdapter;
descriptor: Lorg/jruby/runtime/CallSite;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.runtime.callsite.RespondToCallSite respondToClosed;
descriptor: Lorg/jruby/runtime/callsite/RespondToCallSite;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.runtime.CallSite isClosedAdapter;
descriptor: Lorg/jruby/runtime/CallSite;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.Ruby runtime;
descriptor: Lorg/jruby/Ruby;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
protected void <init>(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
ldc "close"
invokestatic org.jruby.runtime.MethodIndex.getFunctionalCallSite:(Ljava/lang/String;)Lorg/jruby/runtime/CallSite;
putfield org.jruby.util.IOChannel.closeAdapter:Lorg/jruby/runtime/CallSite;
2: aload 0
new org.jruby.runtime.callsite.RespondToCallSite
dup
ldc "closed?"
invokespecial org.jruby.runtime.callsite.RespondToCallSite.<init>:(Ljava/lang/String;)V
putfield org.jruby.util.IOChannel.respondToClosed:Lorg/jruby/runtime/callsite/RespondToCallSite;
3: aload 0
ldc "closed?"
invokestatic org.jruby.runtime.MethodIndex.getFunctionalCallSite:(Ljava/lang/String;)Lorg/jruby/runtime/CallSite;
putfield org.jruby.util.IOChannel.isClosedAdapter:Lorg/jruby/runtime/CallSite;
4: aload 0
aload 1
putfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
5: aload 0
aload 1
invokeinterface org.jruby.runtime.builtin.IRubyObject.getRuntime:()Lorg/jruby/Ruby;
putfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/util/IOChannel;
0 7 1 io Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
io final
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
astore 1
start local 1 1: aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
ldc "close"
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifeq 3
2: aload 0
getfield org.jruby.util.IOChannel.closeAdapter:Lorg/jruby/runtime/CallSite;
aload 1
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.runtime.CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
3: StackMap locals: org.jruby.runtime.ThreadContext
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/util/IOChannel;
1 4 1 context Lorg/jruby/runtime/ThreadContext;
Exceptions:
throws java.io.IOException
public boolean isOpen();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
astore 1
start local 1 1: aload 0
getfield org.jruby.util.IOChannel.respondToClosed:Lorg/jruby/runtime/callsite/RespondToCallSite;
aload 1
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.runtime.callsite.RespondToCallSite.respondsTo:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Z
ifeq 5
2: aload 0
getfield org.jruby.util.IOChannel.isClosedAdapter:Lorg/jruby/runtime/CallSite;
aload 1
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.runtime.CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
invokeinterface org.jruby.runtime.builtin.IRubyObject.isTrue:()Z
ifeq 3
iconst_0
goto 4
StackMap locals: org.jruby.runtime.ThreadContext
StackMap stack:
3: iconst_1
StackMap locals:
StackMap stack: int
4: ireturn
5: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/util/IOChannel;
1 6 1 context Lorg/jruby/runtime/ThreadContext;
protected int read(org.jruby.runtime.CallSite, java.nio.ByteBuffer);
descriptor: (Lorg/jruby/runtime/CallSite;Ljava/nio/ByteBuffer;)I
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
aload 0
getfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
aload 2
invokevirtual java.nio.ByteBuffer.remaining:()I
invokevirtual org.jruby.Ruby.newFixnum:(I)Lorg/jruby/RubyFixnum;
invokevirtual org.jruby.runtime.CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 3
start local 3 1: iconst_m1
istore 4
start local 4 2: aload 3
invokeinterface org.jruby.runtime.builtin.IRubyObject.isNil:()Z
ifne 6
3: aload 3
checkcast org.jruby.RubyString
invokevirtual org.jruby.RubyString.getByteList:()Lorg/jruby/util/ByteList;
astore 5
start local 5 4: aload 2
aload 5
invokevirtual org.jruby.util.ByteList.getUnsafeBytes:()[B
aload 5
invokevirtual org.jruby.util.ByteList.getBegin:()I
aload 5
invokevirtual org.jruby.util.ByteList.getRealSize:()I
invokevirtual java.nio.ByteBuffer.put:([BII)Ljava/nio/ByteBuffer;
pop
5: aload 5
invokevirtual org.jruby.util.ByteList.getRealSize:()I
istore 4
end local 5 6: StackMap locals: org.jruby.runtime.builtin.IRubyObject int
StackMap stack:
iload 4
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/util/IOChannel;
0 7 1 read Lorg/jruby/runtime/CallSite;
0 7 2 dst Ljava/nio/ByteBuffer;
1 7 3 readValue Lorg/jruby/runtime/builtin/IRubyObject;
2 7 4 returnValue I
4 6 5 str Lorg/jruby/util/ByteList;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
read
dst
protected int write(org.jruby.runtime.CallSite, java.nio.ByteBuffer);
descriptor: (Lorg/jruby/runtime/CallSite;Ljava/nio/ByteBuffer;)I
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual java.nio.ByteBuffer.hasArray:()Z
ifeq 3
1: new org.jruby.util.ByteList
dup
aload 2
invokevirtual java.nio.ByteBuffer.array:()[B
aload 2
invokevirtual java.nio.ByteBuffer.position:()I
aload 2
invokevirtual java.nio.ByteBuffer.remaining:()I
iconst_1
invokespecial org.jruby.util.ByteList.<init>:([BIIZ)V
astore 3
start local 3 2: goto 5
end local 3 3: StackMap locals:
StackMap stack:
new org.jruby.util.ByteList
dup
aload 2
invokevirtual java.nio.ByteBuffer.remaining:()I
invokespecial org.jruby.util.ByteList.<init>:(I)V
astore 3
start local 3 4: aload 3
aload 2
aload 2
invokevirtual java.nio.ByteBuffer.remaining:()I
invokevirtual org.jruby.util.ByteList.append:(Ljava/nio/ByteBuffer;I)V
5: StackMap locals: org.jruby.util.ByteList
StackMap stack:
aload 1
aload 0
getfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 0
getfield org.jruby.util.IOChannel.runtime:Lorg/jruby/Ruby;
aload 3
invokestatic org.jruby.RubyString.newStringLight:(Lorg/jruby/Ruby;Lorg/jruby/util/ByteList;)Lorg/jruby/RubyString;
invokevirtual org.jruby.runtime.CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 4
start local 4 6: aload 4
invokeinterface org.jruby.runtime.builtin.IRubyObject.convertToInteger:()Lorg/jruby/RubyInteger;
invokevirtual org.jruby.RubyInteger.getLongValue:()J
l2i
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/util/IOChannel;
0 7 1 write Lorg/jruby/runtime/CallSite;
0 7 2 src Ljava/nio/ByteBuffer;
2 3 3 buffer Lorg/jruby/util/ByteList;
4 7 3 buffer Lorg/jruby/util/ByteList;
6 7 4 written Lorg/jruby/runtime/builtin/IRubyObject;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
write
src
protected org.jruby.runtime.CallSite initReadSite(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/jruby/runtime/CallSite;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
aload 1
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifeq 2
1: aload 1
invokestatic org.jruby.runtime.MethodIndex.getFunctionalCallSite:(Ljava/lang/String;)Lorg/jruby/runtime/CallSite;
areturn
2: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "not coercible to "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ": no `"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "' method"
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
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/IOChannel;
0 3 1 readMethod Ljava/lang/String;
MethodParameters:
Name Flags
readMethod
protected org.jruby.runtime.CallSite initWriteSite();
descriptor: ()Lorg/jruby/runtime/CallSite;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
ldc "write"
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifeq 2
1: ldc "write"
invokestatic org.jruby.runtime.MethodIndex.getFunctionalCallSite:(Ljava/lang/String;)Lorg/jruby/runtime/CallSite;
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
ldc "<<"
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifeq 4
3: ldc "<<"
invokestatic org.jruby.runtime.MethodIndex.getFunctionalCallSite:(Ljava/lang/String;)Lorg/jruby/runtime/CallSite;
areturn
4: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
getfield org.jruby.util.IOChannel.io:Lorg/jruby/runtime/builtin/IRubyObject;
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "not coercible to "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ": no `write' method"
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
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/util/IOChannel;
}
SourceFile: "IOChannel.java"
NestMembers:
org.jruby.util.IOChannel$IOReadableByteChannel org.jruby.util.IOChannel$IOReadableWritableByteChannel org.jruby.util.IOChannel$IOWritableByteChannel
InnerClasses:
public IOReadableByteChannel = org.jruby.util.IOChannel$IOReadableByteChannel of org.jruby.util.IOChannel
public IOReadableWritableByteChannel = org.jruby.util.IOChannel$IOReadableWritableByteChannel of org.jruby.util.IOChannel
public IOWritableByteChannel = org.jruby.util.IOChannel$IOWritableByteChannel of org.jruby.util.IOChannel