public final class jdk.internal.jshell.tool.StopDetectingInputStream extends java.io.InputStream
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.internal.jshell.tool.StopDetectingInputStream
super_class: java.io.InputStream
{
public static final int INITIAL_SIZE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 128
private final java.lang.Runnable stop;
descriptor: Ljava/lang/Runnable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.function.Consumer<java.lang.Exception> errorHandler;
descriptor: Ljava/util/function/Consumer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Consumer<Ljava/lang/Exception;>;
private boolean initialized;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private int[] buffer;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private int start;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int end;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private jdk.internal.jshell.tool.StopDetectingInputStream$State state;
descriptor: Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
flags: (0x0002) ACC_PRIVATE
public void <init>(java.lang.Runnable, java.util.function.Consumer<java.lang.Exception>);
descriptor: (Ljava/lang/Runnable;Ljava/util/function/Consumer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.io.InputStream.<init>:()V
1: aload 0
sipush 128
newarray 10
putfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
2: aload 0
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.WAIT:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
putfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
3: aload 0
aload 1
putfield jdk.internal.jshell.tool.StopDetectingInputStream.stop:Ljava/lang/Runnable;
4: aload 0
aload 2
putfield jdk.internal.jshell.tool.StopDetectingInputStream.errorHandler:Ljava/util/function/Consumer;
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
0 6 1 stop Ljava/lang/Runnable;
0 6 2 errorHandler Ljava/util/function/Consumer<Ljava/lang/Exception;>;
Signature: (Ljava/lang/Runnable;Ljava/util/function/Consumer<Ljava/lang/Exception;>;)V
MethodParameters:
Name Flags
stop
errorHandler
public synchronized java.io.InputStream setInputStream(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)Ljava/io/InputStream;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.initialized:Z
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "Already initialized."
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield jdk.internal.jshell.tool.StopDetectingInputStream.initialized:Z
3: new java.lang.Thread
dup
aload 0
aload 1
invokedynamic run(Ljdk/internal/jshell/tool/StopDetectingInputStream;Ljava/io/InputStream;)Ljava/lang/Runnable;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
jdk/internal/jshell/tool/StopDetectingInputStream.lambda$0(Ljava/io/InputStream;)V (7)
()V
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
astore 2
start local 2 4: aload 2
iconst_1
invokevirtual java.lang.Thread.setDaemon:(Z)V
5: aload 2
invokevirtual java.lang.Thread.start:()V
6: aload 0
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
0 7 1 input Ljava/io/InputStream;
4 7 2 reader Ljava/lang/Thread;
MethodParameters:
Name Flags
input
public synchronized int read();
descriptor: ()I
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=3, args_size=1
start local 0 0: goto 9
1: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.CLOSED:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpne 3
2: iconst_m1
ireturn
3: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.WAIT:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpne 5
4: aload 0
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.READ:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
putfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.notifyAll:()V
6: aload 0
invokevirtual java.lang.Object.wait:()V
7: goto 9
StackMap locals:
StackMap stack: java.lang.InterruptedException
8: pop
9: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
if_icmpeq 1
10: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
iaload
istore 2
11: aload 0
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
iconst_1
iadd
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
arraylength
irem
putfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
12: iload 2
ireturn
13: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
14: aload 0
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
iconst_1
iadd
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
arraylength
irem
putfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
15: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
Exception table:
from to target type
6 7 8 Class java.lang.InterruptedException
10 11 13 any
public synchronized void shutdown();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.CLOSED:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
putfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
1: aload 0
invokevirtual java.lang.Object.notifyAll:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
public synchronized void write(int);
descriptor: (I)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.BUFFER:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpeq 2
1: aload 0
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.WAIT:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
putfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
iconst_1
iadd
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
arraylength
irem
istore 2
start local 2 3: iload 2
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
if_icmpne 17
4: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
arraylength
iconst_2
imul
newarray 10
astore 3
start local 3 5: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
if_icmple 6
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
goto 7
StackMap locals: int int[]
StackMap stack:
6: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
arraylength
StackMap locals:
StackMap stack: int
7: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
isub
istore 4
start local 4 8: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
if_icmple 9
iconst_0
goto 10
StackMap locals: int
StackMap stack:
9: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
iconst_1
isub
StackMap locals:
StackMap stack: int
10: istore 5
start local 5 11: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
aload 3
iconst_0
iload 4
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
12: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
iconst_0
aload 3
iload 4
iload 5
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
13: aload 0
aload 3
putfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
14: aload 0
iconst_0
putfield jdk.internal.jshell.tool.StopDetectingInputStream.start:I
15: aload 0
iload 4
iload 5
iadd
putfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
16: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
iconst_1
iadd
istore 2
end local 5 end local 4 end local 3 17: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.buffer:[I
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
iload 1
iastore
18: aload 0
iload 2
putfield jdk.internal.jshell.tool.StopDetectingInputStream.end:I
19: aload 0
invokevirtual java.lang.Object.notifyAll:()V
20: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
0 21 1 b I
3 21 2 newEnd I
5 17 3 newBuffer [I
8 17 4 rightPart I
11 17 5 leftPart I
MethodParameters:
Name Flags
b
public synchronized void setState(jdk.internal.jshell.tool.StopDetectingInputStream$State);
descriptor: (Ljdk/internal/jshell/tool/StopDetectingInputStream$State;)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.CLOSED:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpeq 3
1: aload 0
aload 1
putfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
2: aload 0
invokevirtual java.lang.Object.notifyAll:()V
3: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
0 4 1 state Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
MethodParameters:
Name Flags
state
private synchronized jdk.internal.jshell.tool.StopDetectingInputStream$State getState();
descriptor: ()Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
private synchronized jdk.internal.jshell.tool.StopDetectingInputStream$State waitInputNeeded();
descriptor: ()Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: goto 4
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.wait:()V
2: goto 4
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: pop
4: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.WAIT:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpeq 1
5: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.state:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
private void lambda$0(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=2, locals=5, args_size=2
start local 0 0: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.jshell.tool.StopDetectingInputStream.waitInputNeeded:()Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
astore 3
start local 3 1: aload 3
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.CLOSED:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpne 3
2: goto 17
3: StackMap locals: jdk.internal.jshell.tool.StopDetectingInputStream java.io.InputStream top jdk.internal.jshell.tool.StopDetectingInputStream$State
StackMap stack:
aload 1
invokevirtual java.io.InputStream.read:()I
dup
istore 2
start local 2 4: iconst_m1
if_icmpne 6
5: goto 17
6: StackMap locals: jdk.internal.jshell.tool.StopDetectingInputStream java.io.InputStream int jdk.internal.jshell.tool.StopDetectingInputStream$State
StackMap stack:
iload 2
iconst_3
if_icmpne 9
aload 0
invokevirtual jdk.internal.jshell.tool.StopDetectingInputStream.getState:()Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
getstatic jdk.internal.jshell.tool.StopDetectingInputStream$State.BUFFER:Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
if_acmpne 9
7: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.stop:Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
8: goto 0
9: StackMap locals:
StackMap stack:
aload 0
iload 2
invokevirtual jdk.internal.jshell.tool.StopDetectingInputStream.write:(I)V
end local 3 end local 2 10: goto 0
11: StackMap locals: jdk.internal.jshell.tool.StopDetectingInputStream java.io.InputStream
StackMap stack: java.io.IOException
astore 2
start local 2 12: aload 0
getfield jdk.internal.jshell.tool.StopDetectingInputStream.errorHandler:Ljava/util/function/Consumer;
aload 2
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 2 13: aload 0
invokevirtual jdk.internal.jshell.tool.StopDetectingInputStream.shutdown:()V
goto 18
14: StackMap locals:
StackMap stack: java.lang.Throwable
astore 4
15: aload 0
invokevirtual jdk.internal.jshell.tool.StopDetectingInputStream.shutdown:()V
16: aload 4
athrow
17: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.jshell.tool.StopDetectingInputStream.shutdown:()V
18: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Ljdk/internal/jshell/tool/StopDetectingInputStream;
4 10 2 read I
1 10 3 currentState Ljdk/internal/jshell/tool/StopDetectingInputStream$State;
12 13 2 ex Ljava/io/IOException;
Exception table:
from to target type
0 11 11 Class java.io.IOException
0 13 14 any
}
SourceFile: "StopDetectingInputStream.java"
NestMembers:
jdk.internal.jshell.tool.StopDetectingInputStream$State
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public final State = jdk.internal.jshell.tool.StopDetectingInputStream$State of jdk.internal.jshell.tool.StopDetectingInputStream