Console (Java SE 25 & JDK 25)
- All Implemented Interfaces:
Flushable
-
Method Summary
charset()Returns the
Charsetobject used for the write operations on thisConsole.voidflush()Flushes the console and forces any buffered output to be written immediately.
Writes a formatted string to this console's output stream using the specified format string and arguments with the
default format locale.Writes a formatted string to this console's output stream using the specified format string and arguments with the specified
locale.booleanReturns
trueif theConsoleinstance is a terminal.A convenience method to write a formatted string to this console's output stream using the specified format string and arguments with the
default format locale.A convenience method to write a formatted string to this console's output stream using the specified format string and arguments with the specified
locale.reader()Retrieves the unique
Readerobject associated with this console.readLine()Reads a single line of text from the console.
Provides a formatted prompt using the
default format locale, then reads a single line of text from the console.Provides a formatted prompt using the specified
locale, then reads a single line of text from the console.char[]Reads a password or passphrase from the console with echoing disabled.
char[]Provides a formatted prompt using the
default format locale, then reads a password or passphrase from the console with echoing disabled.char[]Provides a formatted prompt using the specified
locale, then reads a password or passphrase from the console with echoing disabled.writer()Retrieves the unique
PrintWriterobject associated with this console.
-
Method Details
-
writer
-
reader
-
format
-
format
-
printf
-
printf
-
readLine
-
readLine
-
readLine
-
readPassword
-
readPassword
-
readPassword
-
flush
-
charset
-
isTerminal
-