class org.jruby.util.ShellLauncher$StreamPumper extends java.lang.Thread implements org.jruby.util.ShellLauncher$Pumper
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.jruby.util.ShellLauncher$StreamPumper
super_class: java.lang.Thread
{
private final java.io.InputStream in;
descriptor: Ljava/io/InputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.io.OutputStream out;
descriptor: Ljava/io/OutputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean onlyIfAvailable;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Object waitLock;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Object sync;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.util.ShellLauncher$Pumper$Slave slave;
descriptor: Lorg/jruby/util/ShellLauncher$Pumper$Slave;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile boolean quit;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final org.jruby.Ruby runtime;
descriptor: Lorg/jruby/Ruby;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>(org.jruby.Ruby, java.io.InputStream, java.io.OutputStream, boolean, org.jruby.util.ShellLauncher$Pumper$Slave, java.lang.Object);
descriptor: (Lorg/jruby/Ruby;Ljava/io/InputStream;Ljava/io/OutputStream;ZLorg/jruby/util/ShellLauncher$Pumper$Slave;Ljava/lang/Object;)V
flags: (0x0000)
Code:
stack=3, locals=7, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
invokespecial java.lang.Thread.<init>:()V
1: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield org.jruby.util.ShellLauncher$StreamPumper.waitLock:Ljava/lang/Object;
2: aload 0
aload 2
invokestatic org.jruby.util.io.ChannelHelper.unwrapBufferedStream:(Ljava/io/InputStream;)Ljava/io/InputStream;
putfield org.jruby.util.ShellLauncher$StreamPumper.in:Ljava/io/InputStream;
3: aload 0
aload 3
invokestatic org.jruby.util.io.ChannelHelper.unwrapBufferedStream:(Ljava/io/OutputStream;)Ljava/io/OutputStream;
putfield org.jruby.util.ShellLauncher$StreamPumper.out:Ljava/io/OutputStream;
4: aload 0
iload 4
putfield org.jruby.util.ShellLauncher$StreamPumper.onlyIfAvailable:Z
5: aload 0
aload 5
putfield org.jruby.util.ShellLauncher$StreamPumper.slave:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
6: aload 0
aload 6
putfield org.jruby.util.ShellLauncher$StreamPumper.sync:Ljava/lang/Object;
7: aload 0
aload 1
putfield org.jruby.util.ShellLauncher$StreamPumper.runtime:Lorg/jruby/Ruby;
8: aload 0
iconst_1
invokevirtual org.jruby.util.ShellLauncher$StreamPumper.setDaemon:(Z)V
9: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/jruby/util/ShellLauncher$StreamPumper;
0 10 1 runtime Lorg/jruby/Ruby;
0 10 2 in Ljava/io/InputStream;
0 10 3 out Ljava/io/OutputStream;
0 10 4 avail Z
0 10 5 slave Lorg/jruby/util/ShellLauncher$Pumper$Slave;
0 10 6 sync Ljava/lang/Object;
MethodParameters:
Name Flags
runtime
in
out
avail
slave
sync
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
iconst_0
invokevirtual org.jruby.runtime.ThreadContext.setEventHooksEnabled:(Z)V
1: sipush 1024
newarray 8
astore 1
start local 1 2: iconst_0
istore 3
start local 3 3: goto 17
4: StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int
StackMap stack:
aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.onlyIfAvailable:Z
ifeq 13
iload 3
ifne 13
5: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.available:()I
ifne 12
6: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.waitLock:Ljava/lang/Object;
dup
astore 4
monitorenter
7: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.waitLock:Ljava/lang/Object;
ldc 10
invokevirtual java.lang.Object.wait:(J)V
8: aload 4
monitorexit
9: goto 17
StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int java.lang.Object
StackMap stack: java.lang.Throwable
10: aload 4
monitorexit
11: athrow
12: StackMap locals:
StackMap stack:
iconst_1
istore 3
13: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.in:Ljava/io/InputStream;
aload 1
invokevirtual java.io.InputStream.read:([B)I
dup
istore 2
start local 2 14: iconst_m1
if_icmpne 16
15: goto 42
16: StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] int int
StackMap stack:
aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.out:Ljava/io/OutputStream;
aload 1
iconst_0
iload 2
invokevirtual java.io.OutputStream.write:([BII)V
end local 2 17: StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int
StackMap stack:
aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.quit:Z
ifeq 4
18: goto 42
StackMap locals:
StackMap stack: java.lang.Exception
19: pop
20: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.onlyIfAvailable:Z
ifeq 52
21: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.sync:Ljava/lang/Object;
dup
astore 6
monitorenter
22: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.slave:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
getstatic org.jruby.util.ShellLauncher$Pumper$Slave.OUT:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
if_acmpne 26
23: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.out:Ljava/io/OutputStream;
invokevirtual java.io.OutputStream.close:()V
24: goto 26
StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int top top java.lang.Object
StackMap stack: java.io.IOException
25: pop
26: StackMap locals:
StackMap stack:
aload 6
monitorexit
27: goto 52
StackMap locals:
StackMap stack: java.lang.Throwable
28: aload 6
monitorexit
29: athrow
30: StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int
StackMap stack: java.lang.Throwable
astore 5
31: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.onlyIfAvailable:Z
ifeq 41
32: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.sync:Ljava/lang/Object;
dup
astore 6
monitorenter
33: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.slave:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
getstatic org.jruby.util.ShellLauncher$Pumper$Slave.OUT:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
if_acmpne 37
34: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.out:Ljava/io/OutputStream;
invokevirtual java.io.OutputStream.close:()V
35: goto 37
StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int top java.lang.Throwable java.lang.Object
StackMap stack: java.io.IOException
36: pop
37: StackMap locals:
StackMap stack:
aload 6
monitorexit
38: goto 41
StackMap locals:
StackMap stack: java.lang.Throwable
39: aload 6
monitorexit
40: athrow
41: StackMap locals:
StackMap stack:
aload 5
athrow
42: StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int
StackMap stack:
aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.onlyIfAvailable:Z
ifeq 52
43: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.sync:Ljava/lang/Object;
dup
astore 6
monitorenter
44: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.slave:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
getstatic org.jruby.util.ShellLauncher$Pumper$Slave.OUT:Lorg/jruby/util/ShellLauncher$Pumper$Slave;
if_acmpne 48
45: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.out:Ljava/io/OutputStream;
invokevirtual java.io.OutputStream.close:()V
46: goto 48
StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int top top java.lang.Object
StackMap stack: java.io.IOException
47: pop
48: StackMap locals:
StackMap stack:
aload 6
monitorexit
49: goto 52
StackMap locals:
StackMap stack: java.lang.Throwable
50: aload 6
monitorexit
51: athrow
52: StackMap locals: org.jruby.util.ShellLauncher$StreamPumper byte[] top int
StackMap stack:
return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 53 0 this Lorg/jruby/util/ShellLauncher$StreamPumper;
2 53 1 buf [B
14 17 2 numRead I
3 53 3 hasReadSomething Z
Exception table:
from to target type
7 9 10 any
10 11 10 any
3 18 19 Class java.lang.Exception
23 24 25 Class java.io.IOException
22 27 28 any
28 29 28 any
3 20 30 any
34 35 36 Class java.io.IOException
33 38 39 any
39 40 39 any
45 46 47 Class java.io.IOException
44 49 50 any
50 51 50 any
public void quit();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
iconst_1
putfield org.jruby.util.ShellLauncher$StreamPumper.quit:Z
1: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.waitLock:Ljava/lang/Object;
dup
astore 1
monitorenter
2: aload 0
getfield org.jruby.util.ShellLauncher$StreamPumper.waitLock:Ljava/lang/Object;
invokevirtual java.lang.Object.notify:()V
3: aload 1
monitorexit
4: goto 7
StackMap locals: org.jruby.util.ShellLauncher$StreamPumper java.lang.Object
StackMap stack: java.lang.Throwable
5: aload 1
monitorexit
6: athrow
7: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.jruby.util.ShellLauncher$StreamPumper.interrupt:()V
8: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/util/ShellLauncher$StreamPumper;
Exception table:
from to target type
2 4 5 any
5 6 5 any
}
SourceFile: "ShellLauncher.java"
NestHost: org.jruby.util.ShellLauncher
InnerClasses:
private abstract Pumper = org.jruby.util.ShellLauncher$Pumper of org.jruby.util.ShellLauncher
public final Slave = org.jruby.util.ShellLauncher$Pumper$Slave of org.jruby.util.ShellLauncher$Pumper
private StreamPumper = org.jruby.util.ShellLauncher$StreamPumper of org.jruby.util.ShellLauncher