public class jdk.internal.jline.internal.NonBlockingInputStream extends java.io.InputStream implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.jline.internal.NonBlockingInputStream
super_class: java.io.InputStream
{
private java.io.InputStream in;
descriptor: Ljava/io/InputStream;
flags: (0x0002) ACC_PRIVATE
private int ch;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean threadIsReading;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean isShutdown;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private java.io.IOException exception;
descriptor: Ljava/io/IOException;
flags: (0x0002) ACC_PRIVATE
private boolean nonBlockingEnabled;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Ljdk/internal/jline/internal/NonBlockingInputStream;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic jdk.internal.jline.internal.NonBlockingInputStream.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.io.InputStream, boolean);
descriptor: (Ljava/io/InputStream;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.io.InputStream.<init>:()V
1: aload 0
bipush -2
putfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
2: aload 0
iconst_0
putfield jdk.internal.jline.internal.NonBlockingInputStream.threadIsReading:Z
3: aload 0
iconst_0
putfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
4: aload 0
aconst_null
putfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
5: aload 0
aload 1
putfield jdk.internal.jline.internal.NonBlockingInputStream.in:Ljava/io/InputStream;
6: aload 0
iload 2
putfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
7: iload 2
ifeq 12
8: new java.lang.Thread
dup
aload 0
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
astore 3
start local 3 9: aload 3
ldc "NonBlockingInputStreamThread"
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
10: aload 3
iconst_1
invokevirtual java.lang.Thread.setDaemon:(Z)V
11: aload 3
invokevirtual java.lang.Thread.start:()V
end local 3 12: StackMap locals: jdk.internal.jline.internal.NonBlockingInputStream java.io.InputStream int
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
0 13 1 in Ljava/io/InputStream;
0 13 2 isNonBlockingEnabled Z
9 12 3 t Ljava/lang/Thread;
MethodParameters:
Name Flags
in
isNonBlockingEnabled
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
getfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
ifne 3
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
ifeq 3
1: aload 0
iconst_1
putfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
2: aload 0
invokevirtual java.lang.Object.notify:()V
3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
public boolean isNonBlockingEnabled();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
ifeq 1
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
ifne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.close:()V
1: aload 0
invokevirtual jdk.internal.jline.internal.NonBlockingInputStream.shutdown:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
Exceptions:
throws java.io.IOException
public int read();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
ifeq 2
1: aload 0
lconst_0
iconst_0
invokevirtual jdk.internal.jline.internal.NonBlockingInputStream.read:(JZ)I
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.read:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
Exceptions:
throws java.io.IOException
public int peek(long);
descriptor: (J)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
ifeq 1
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
ifeq 2
1: StackMap locals:
StackMap stack:
new java.lang.UnsupportedOperationException
dup
ldc "peek() cannot be called as non-blocking operation is disabled"
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
lload 1
iconst_1
invokevirtual jdk.internal.jline.internal.NonBlockingInputStream.read:(JZ)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
0 3 1 timeout J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
timeout
public int read(long);
descriptor: (J)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
ifeq 1
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
ifeq 2
1: StackMap locals:
StackMap stack:
new java.lang.UnsupportedOperationException
dup
ldc "read() with timeout cannot be called as non-blocking operation is disabled"
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
lload 1
iconst_0
invokevirtual jdk.internal.jline.internal.NonBlockingInputStream.read:(JZ)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
0 3 1 timeout J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
timeout
private synchronized int read(long, boolean);
descriptor: (JZ)I
flags: (0x0022) ACC_PRIVATE, ACC_SYNCHRONIZED
Code:
stack=6, locals=8, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
ifnull 6
1: getstatic jdk.internal.jline.internal.NonBlockingInputStream.$assertionsDisabled:Z
ifne 2
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
bipush -2
if_icmpeq 2
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
astore 4
start local 4 3: iload 3
ifne 5
4: aload 0
aconst_null
putfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
5: StackMap locals: java.io.IOException
StackMap stack:
aload 4
athrow
end local 4 6: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
iconst_m1
if_icmplt 8
7: getstatic jdk.internal.jline.internal.NonBlockingInputStream.$assertionsDisabled:Z
ifne 34
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
ifnull 34
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
8: StackMap locals:
StackMap stack:
lload 1
lconst_0
lcmp
ifeq 9
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
ifeq 12
StackMap locals:
StackMap stack:
9: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.threadIsReading:Z
ifne 12
10: aload 0
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.read:()I
putfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
11: goto 34
12: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.threadIsReading:Z
ifne 15
13: aload 0
iconst_1
putfield jdk.internal.jline.internal.NonBlockingInputStream.threadIsReading:Z
14: aload 0
invokevirtual java.lang.Object.notify:()V
15: StackMap locals:
StackMap stack:
lload 1
lconst_0
lcmp
ifgt 16
iconst_1
goto 17
StackMap locals:
StackMap stack:
16: iconst_0
StackMap locals:
StackMap stack: int
17: istore 4
start local 4 18: goto 33
19: StackMap locals: int
StackMap stack:
invokestatic java.lang.System.currentTimeMillis:()J
lstore 5
start local 5 20: aload 0
lload 1
invokevirtual java.lang.Object.wait:(J)V
21: goto 23
22: StackMap locals: jdk.internal.jline.internal.NonBlockingInputStream long int int long
StackMap stack: java.lang.InterruptedException
pop
23: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
ifnull 29
24: getstatic jdk.internal.jline.internal.NonBlockingInputStream.$assertionsDisabled:Z
ifne 25
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
bipush -2
if_icmpeq 25
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
25: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
astore 7
start local 7 26: iload 3
ifne 28
27: aload 0
aconst_null
putfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
28: StackMap locals: java.io.IOException
StackMap stack:
aload 7
athrow
end local 7 29: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
iconst_m1
if_icmplt 31
30: getstatic jdk.internal.jline.internal.NonBlockingInputStream.$assertionsDisabled:Z
ifne 34
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
ifnull 34
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
31: StackMap locals:
StackMap stack:
iload 4
ifne 33
32: lload 1
invokestatic java.lang.System.currentTimeMillis:()J
lload 5
lsub
lsub
lstore 1
end local 5 33: StackMap locals:
StackMap stack:
iload 4
ifne 19
lload 1
lconst_0
lcmp
ifgt 19
end local 4 34: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
istore 4
start local 4 35: iload 3
ifne 37
36: aload 0
bipush -2
putfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
37: StackMap locals: int
StackMap stack:
iload 4
ireturn
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 38 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
0 38 1 timeout J
0 38 3 isPeek Z
3 6 4 toBeThrown Ljava/io/IOException;
18 34 4 isInfinite Z
20 33 5 start J
26 29 7 toBeThrown Ljava/io/IOException;
35 38 4 ret I
Exception table:
from to target type
20 21 22 Class java.lang.InterruptedException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
timeout
isPeek
public int read(byte[], int, int);
descriptor: ([BII)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
iload 2
iflt 3
iload 3
iflt 3
iload 3
aload 1
arraylength
iload 2
isub
if_icmple 4
3: StackMap locals:
StackMap stack:
new java.lang.IndexOutOfBoundsException
dup
invokespecial java.lang.IndexOutOfBoundsException.<init>:()V
athrow
4: StackMap locals:
StackMap stack:
iload 3
ifne 6
5: iconst_0
ireturn
6: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.nonBlockingEnabled:Z
ifeq 9
7: aload 0
lconst_0
invokevirtual jdk.internal.jline.internal.NonBlockingInputStream.read:(J)I
istore 4
start local 4 8: goto 10
end local 4 9: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.read:()I
istore 4
start local 4 10: StackMap locals: int
StackMap stack:
iload 4
iconst_m1
if_icmpne 12
11: iconst_m1
ireturn
12: StackMap locals:
StackMap stack:
aload 1
iload 2
iload 4
i2b
bastore
13: iconst_1
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
0 14 1 b [B
0 14 2 off I
0 14 3 len I
8 9 4 c I
10 14 4 c I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: iconst_1
anewarray java.lang.Object
dup
iconst_0
1: ldc "NonBlockingInputStream start"
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
2: iconst_0
istore 1
start local 1 3: iconst_0
istore 2
start local 2 4: goto 32
5: StackMap locals: int int
StackMap stack:
aload 0
dup
astore 3
monitorenter
6: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.isShutdown:Z
istore 1
7: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.threadIsReading:Z
istore 2
8: iload 1
ifne 12
iload 2
ifne 12
9: aload 0
lconst_0
invokevirtual java.lang.Object.wait:(J)V
10: goto 12
11: StackMap locals: jdk.internal.jline.internal.NonBlockingInputStream int int jdk.internal.jline.internal.NonBlockingInputStream
StackMap stack: java.lang.InterruptedException
pop
12: StackMap locals:
StackMap stack:
aload 3
monitorexit
13: goto 16
StackMap locals:
StackMap stack: java.lang.Throwable
14: aload 3
monitorexit
15: athrow
16: StackMap locals:
StackMap stack:
iload 1
ifne 32
iload 2
ifeq 32
17: bipush -2
istore 3
start local 3 18: aconst_null
astore 4
start local 4 19: aload 0
getfield jdk.internal.jline.internal.NonBlockingInputStream.in:Ljava/io/InputStream;
invokevirtual java.io.InputStream.read:()I
istore 3
20: goto 23
21: StackMap locals: jdk.internal.jline.internal.NonBlockingInputStream int int int java.io.IOException
StackMap stack: java.io.IOException
astore 5
start local 5 22: aload 5
astore 4
end local 5 23: StackMap locals:
StackMap stack:
aload 0
dup
astore 5
monitorenter
24: aload 0
aload 4
putfield jdk.internal.jline.internal.NonBlockingInputStream.exception:Ljava/io/IOException;
25: aload 0
iload 3
putfield jdk.internal.jline.internal.NonBlockingInputStream.ch:I
26: aload 0
iconst_0
putfield jdk.internal.jline.internal.NonBlockingInputStream.threadIsReading:Z
27: aload 0
invokevirtual java.lang.Object.notify:()V
28: aload 5
monitorexit
29: goto 32
StackMap locals: jdk.internal.jline.internal.NonBlockingInputStream int int int java.io.IOException jdk.internal.jline.internal.NonBlockingInputStream
StackMap stack: java.lang.Throwable
30: aload 5
monitorexit
31: athrow
end local 4 end local 3 32: StackMap locals:
StackMap stack:
iload 1
ifeq 5
iconst_1
anewarray java.lang.Object
dup
iconst_0
33: ldc "NonBlockingInputStream shutdown"
aastore
invokestatic jdk.internal.jline.internal.Log.debug:([Ljava/lang/Object;)V
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 34 0 this Ljdk/internal/jline/internal/NonBlockingInputStream;
3 34 1 needToShutdown Z
4 34 2 needToRead Z
18 32 3 charRead I
19 32 4 failure Ljava/io/IOException;
22 23 5 e Ljava/io/IOException;
Exception table:
from to target type
8 10 11 Class java.lang.InterruptedException
6 13 14 any
14 15 14 any
19 20 21 Class java.io.IOException
24 29 30 any
30 31 30 any
}
SourceFile: "NonBlockingInputStream.java"