public final class java.io.Console implements java.io.Flushable
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: java.io.Console
super_class: java.lang.Object
{
private java.lang.Object readLock;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
private java.lang.Object writeLock;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
private java.io.Reader reader;
descriptor: Ljava/io/Reader;
flags: (0x0002) ACC_PRIVATE
private java.io.Writer out;
descriptor: Ljava/io/Writer;
flags: (0x0002) ACC_PRIVATE
private java.io.PrintWriter pw;
descriptor: Ljava/io/PrintWriter;
flags: (0x0002) ACC_PRIVATE
private java.util.Formatter formatter;
descriptor: Ljava/util/Formatter;
flags: (0x0002) ACC_PRIVATE
private java.nio.charset.Charset cs;
descriptor: Ljava/nio/charset/Charset;
flags: (0x0002) ACC_PRIVATE
private char[] rcb;
descriptor: [C
flags: (0x0002) ACC_PRIVATE
private static boolean echoOff;
descriptor: Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static java.io.Console cons;
descriptor: Ljava/io/Console;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
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=2, locals=0, args_size=0
0: ldc Ljava/io/Console;
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 java.io.Console.$assertionsDisabled:Z
3: new java.io.Console$1
dup
invokespecial java.io.Console$1.<init>:()V
invokestatic sun.misc.SharedSecrets.setJavaIOAccess:(Lsun/misc/JavaIOAccess;)V
4: return
LocalVariableTable:
Start End Slot Name Signature
public java.io.PrintWriter writer();
descriptor: ()Ljava/io/PrintWriter;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.io.Console.pw:Ljava/io/PrintWriter;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/io/Console;
public java.io.Reader reader();
descriptor: ()Ljava/io/Reader;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.io.Console.reader:Ljava/io/Reader;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/io/Console;
public java.io.Console format(java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/Console;
flags: (0x0081) ACC_PUBLIC, ACC_VARARGS
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield java.io.Console.formatter:Ljava/util/Formatter;
aload 1
aload 2
invokevirtual java.util.Formatter.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;
invokevirtual java.util.Formatter.flush:()V
1: aload 0
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/Console;
0 2 1 fmt Ljava/lang/String;
0 2 2 args [Ljava/lang/Object;
MethodParameters:
Name Flags
fmt
args
public java.io.Console printf(java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/Console;
flags: (0x0081) ACC_PUBLIC, ACC_VARARGS
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokevirtual java.io.Console.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/Console;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/io/Console;
0 1 1 format Ljava/lang/String;
0 1 2 args [Ljava/lang/Object;
MethodParameters:
Name Flags
format
args
public java.lang.String readLine(java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
flags: (0x0081) ACC_PUBLIC, ACC_VARARGS
Code:
stack=3, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aconst_null
astore 3
start local 3 1: aload 0
getfield java.io.Console.writeLock:Ljava/lang/Object;
dup
astore 4
monitorenter
2: aload 0
getfield java.io.Console.readLock:Ljava/lang/Object;
dup
astore 5
monitorenter
3: aload 1
invokevirtual java.lang.String.length:()I
ifeq 5
4: aload 0
getfield java.io.Console.pw:Ljava/io/PrintWriter;
aload 1
aload 2
invokevirtual java.io.PrintWriter.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintWriter;
pop
5: StackMap locals: java.lang.String java.lang.Object java.lang.Object
StackMap stack:
aload 0
iconst_0
invokevirtual java.io.Console.readline:(Z)[C
astore 6
start local 6 6: aload 6
ifnull 11
7: new java.lang.String
dup
aload 6
invokespecial java.lang.String.<init>:([C)V
astore 3
end local 6 8: goto 11
StackMap locals:
StackMap stack: java.io.IOException
9: astore 6
start local 6 10: new java.io.IOError
dup
aload 6
invokespecial java.io.IOError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 6 11: StackMap locals:
StackMap stack:
aload 5
monitorexit
12: goto 15
StackMap locals:
StackMap stack: java.lang.Throwable
13: aload 5
monitorexit
14: athrow
15: StackMap locals:
StackMap stack:
aload 4
monitorexit
16: goto 19
StackMap locals:
StackMap stack: java.lang.Throwable
17: aload 4
monitorexit
18: athrow
19: StackMap locals:
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Ljava/io/Console;
0 20 1 fmt Ljava/lang/String;
0 20 2 args [Ljava/lang/Object;
1 20 3 line Ljava/lang/String;
6 8 6 ca [C
10 11 6 x Ljava/io/IOException;
Exception table:
from to target type
5 8 9 Class java.io.IOException
3 12 13 any
13 14 13 any
2 16 17 any
17 18 17 any
MethodParameters:
Name Flags
fmt
args
public java.lang.String readLine();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc ""
iconst_0
anewarray java.lang.Object
invokevirtual java.io.Console.readLine:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/io/Console;
public char[] readPassword(java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;[Ljava/lang/Object;)[C
flags: (0x0081) ACC_PUBLIC, ACC_VARARGS
Code:
stack=3, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aconst_null
astore 3
start local 3 1: aload 0
getfield java.io.Console.writeLock:Ljava/lang/Object;
dup
astore 4
monitorenter
2: aload 0
getfield java.io.Console.readLock:Ljava/lang/Object;
dup
astore 5
monitorenter
3: aload 1
invokevirtual java.lang.String.length:()I
ifeq 5
4: aload 0
getfield java.io.Console.pw:Ljava/io/PrintWriter;
aload 1
aload 2
invokevirtual java.io.PrintWriter.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintWriter;
pop
5: StackMap locals: char[] java.lang.Object java.lang.Object
StackMap stack:
iconst_0
invokestatic java.io.Console.echo:(Z)Z
putstatic java.io.Console.echoOff:Z
6: aload 0
iconst_1
invokevirtual java.io.Console.readline:(Z)[C
astore 3
7: goto 15
StackMap locals:
StackMap stack: java.io.IOException
8: astore 6
start local 6 9: new java.io.IOError
dup
aload 6
invokespecial java.io.IOError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 6 10: StackMap locals:
StackMap stack: java.lang.Throwable
astore 7
11: iconst_1
invokestatic java.io.Console.echo:(Z)Z
putstatic java.io.Console.echoOff:Z
12: goto 14
StackMap locals: java.io.Console java.lang.String java.lang.Object[] char[] java.lang.Object java.lang.Object top java.lang.Throwable
StackMap stack: java.io.IOException
13: pop
14: StackMap locals:
StackMap stack:
aload 7
athrow
15: StackMap locals: java.io.Console java.lang.String java.lang.Object[] char[] java.lang.Object java.lang.Object
StackMap stack:
iconst_1
invokestatic java.io.Console.echo:(Z)Z
putstatic java.io.Console.echoOff:Z
16: goto 18
StackMap locals:
StackMap stack: java.io.IOException
17: pop
18: StackMap locals:
StackMap stack:
aload 0
getfield java.io.Console.pw:Ljava/io/PrintWriter;
invokevirtual java.io.PrintWriter.println:()V
19: aload 5
monitorexit
20: goto 23
StackMap locals:
StackMap stack: java.lang.Throwable
21: aload 5
monitorexit
22: athrow
23: StackMap locals:
StackMap stack:
aload 4
monitorexit
24: goto 27
StackMap locals:
StackMap stack: java.lang.Throwable
25: aload 4
monitorexit
26: athrow
27: StackMap locals:
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Ljava/io/Console;
0 28 1 fmt Ljava/lang/String;
0 28 2 args [Ljava/lang/Object;
1 28 3 passwd [C
9 10 6 x Ljava/io/IOException;
Exception table:
from to target type
5 7 8 Class java.io.IOException
5 10 10 any
11 12 13 Class java.io.IOException
15 16 17 Class java.io.IOException
3 20 21 any
21 22 21 any
2 24 25 any
25 26 25 any
MethodParameters:
Name Flags
fmt
args
public char[] readPassword();
descriptor: ()[C
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc ""
iconst_0
anewarray java.lang.Object
invokevirtual java.io.Console.readPassword:(Ljava/lang/String;[Ljava/lang/Object;)[C
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/io/Console;
public void flush();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.io.Console.pw:Ljava/io/PrintWriter;
invokevirtual java.io.PrintWriter.flush:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/Console;
private static native java.lang.String encoding();
descriptor: ()Ljava/lang/String;
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
private static native boolean echo(boolean);
descriptor: (Z)Z
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
on
private char[] readline(boolean);
descriptor: (Z)[C
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield java.io.Console.reader:Ljava/io/Reader;
aload 0
getfield java.io.Console.rcb:[C
iconst_0
aload 0
getfield java.io.Console.rcb:[C
arraylength
invokevirtual java.io.Reader.read:([CII)I
istore 2
start local 2 1: iload 2
ifge 3
2: aconst_null
areturn
3: StackMap locals: int
StackMap stack:
aload 0
getfield java.io.Console.rcb:[C
iload 2
iconst_1
isub
caload
bipush 13
if_icmpne 5
4: iinc 2 -1
goto 9
5: StackMap locals:
StackMap stack:
aload 0
getfield java.io.Console.rcb:[C
iload 2
iconst_1
isub
caload
bipush 10
if_icmpne 9
6: iinc 2 -1
7: iload 2
ifle 9
aload 0
getfield java.io.Console.rcb:[C
iload 2
iconst_1
isub
caload
bipush 13
if_icmpne 9
8: iinc 2 -1
9: StackMap locals:
StackMap stack:
iload 2
newarray 5
astore 3
start local 3 10: iload 2
ifle 14
11: aload 0
getfield java.io.Console.rcb:[C
iconst_0
aload 3
iconst_0
iload 2
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
12: iload 1
ifeq 14
13: aload 0
getfield java.io.Console.rcb:[C
iconst_0
iload 2
bipush 32
invokestatic java.util.Arrays.fill:([CIIC)V
14: StackMap locals: char[]
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Ljava/io/Console;
0 15 1 zeroOut Z
1 15 2 len I
10 15 3 b [C
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
zeroOut
private char[] grow();
descriptor: ()[C
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=1
start local 0 0: getstatic java.io.Console.$assertionsDisabled:Z
ifne 1
aload 0
getfield java.io.Console.readLock:Ljava/lang/Object;
invokestatic java.lang.Thread.holdsLock:(Ljava/lang/Object;)Z
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
getfield java.io.Console.rcb:[C
arraylength
iconst_2
imul
newarray 5
astore 1
start local 1 2: aload 0
getfield java.io.Console.rcb:[C
iconst_0
aload 1
iconst_0
aload 0
getfield java.io.Console.rcb:[C
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
3: aload 0
aload 1
putfield java.io.Console.rcb:[C
4: aload 0
getfield java.io.Console.rcb:[C
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/io/Console;
2 5 1 t [C
private static native boolean istty();
descriptor: ()Z
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=2, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield java.io.Console.readLock:Ljava/lang/Object;
2: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield java.io.Console.writeLock:Ljava/lang/Object;
3: invokestatic java.io.Console.encoding:()Ljava/lang/String;
astore 1
start local 1 4: aload 1
ifnull 8
5: aload 0
aload 1
invokestatic java.nio.charset.Charset.forName:(Ljava/lang/String;)Ljava/nio/charset/Charset;
putfield java.io.Console.cs:Ljava/nio/charset/Charset;
6: goto 8
StackMap locals: java.io.Console java.lang.String
StackMap stack: java.lang.Exception
7: pop
8: StackMap locals:
StackMap stack:
aload 0
getfield java.io.Console.cs:Ljava/nio/charset/Charset;
ifnonnull 10
9: aload 0
invokestatic java.nio.charset.Charset.defaultCharset:()Ljava/nio/charset/Charset;
putfield java.io.Console.cs:Ljava/nio/charset/Charset;
10: StackMap locals:
StackMap stack:
aload 0
11: new java.io.FileOutputStream
dup
getstatic java.io.FileDescriptor.out:Ljava/io/FileDescriptor;
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/FileDescriptor;)V
12: aload 0
getfield java.io.Console.writeLock:Ljava/lang/Object;
13: aload 0
getfield java.io.Console.cs:Ljava/nio/charset/Charset;
14: invokestatic sun.nio.cs.StreamEncoder.forOutputStreamWriter:(Ljava/io/OutputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)Lsun/nio/cs/StreamEncoder;
putfield java.io.Console.out:Ljava/io/Writer;
15: aload 0
new java.io.Console$2
dup
aload 0
aload 0
getfield java.io.Console.out:Ljava/io/Writer;
iconst_1
invokespecial java.io.Console$2.<init>:(Ljava/io/Console;Ljava/io/Writer;Z)V
putfield java.io.Console.pw:Ljava/io/PrintWriter;
16: aload 0
new java.util.Formatter
dup
aload 0
getfield java.io.Console.out:Ljava/io/Writer;
invokespecial java.util.Formatter.<init>:(Ljava/lang/Appendable;)V
putfield java.io.Console.formatter:Ljava/util/Formatter;
17: aload 0
new java.io.Console$LineReader
dup
aload 0
18: new java.io.FileInputStream
dup
getstatic java.io.FileDescriptor.in:Ljava/io/FileDescriptor;
invokespecial java.io.FileInputStream.<init>:(Ljava/io/FileDescriptor;)V
19: aload 0
getfield java.io.Console.readLock:Ljava/lang/Object;
20: aload 0
getfield java.io.Console.cs:Ljava/nio/charset/Charset;
21: invokestatic sun.nio.cs.StreamDecoder.forInputStreamReader:(Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)Lsun/nio/cs/StreamDecoder;
invokespecial java.io.Console$LineReader.<init>:(Ljava/io/Console;Ljava/io/Reader;)V
putfield java.io.Console.reader:Ljava/io/Reader;
22: aload 0
sipush 1024
newarray 5
putfield java.io.Console.rcb:[C
23: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Ljava/io/Console;
4 24 1 csname Ljava/lang/String;
Exception table:
from to target type
5 6 7 Class java.lang.Exception
}
SourceFile: "Console.java"
NestMembers:
java.io.Console$1 java.io.Console$1$1 java.io.Console$2 java.io.Console$LineReader
InnerClasses:
java.io.Console$1
java.io.Console$2
LineReader = java.io.Console$LineReader of java.io.Console