Flush the output stream.
Flush the output stream. This function is required when partial output (i.e. output not terminated by a new line character) has to be made visible on the terminal.
Print an object on the terminal.
Print an object on the terminal.
the object to print.
Prints its arguments as a formatted string, based on a string pattern (in a fashion similar to printf in C).
Prints its arguments as a formatted string, based on a string pattern (in a fashion similar to printf in C).
The interpretation of the formatting patterns is described in
java.util.Formatter
.
the pattern for formatting the arguments.
the arguments used to instantiating the pattern.
Print out an object followed by a new line character.
Print out an object followed by a new line character.
the object to print.
Print a new line character on the terminal.
Print a new line character on the terminal.
Read a boolean value from the terminal.
Read a boolean value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
the boolean value read from the terminal.
Read a byte value from the terminal.
Read a byte value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Read a char value from the terminal.
Read a char value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Read a double value from the terminal.
Read a double value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Read a float value from the terminal.
Read a float value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Read an int value from the terminal.
Read an int value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Print a formatted text and read a full line from the terminal.
Print a formatted text and read a full line from the terminal. Returns null if the end of the input stream has been reached.
the format of the text to print out.
the parameters used to instantiate the format.
the string read from the terminal.
Read a full line from the terminal.
Read a full line from the terminal. Returns null
if the end of the
input stream has been reached.
the string read from the terminal.
Read an int value from the terminal.
Read an int value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Read a short value from the terminal.
Read a short value from the terminal.
Throws EOFException
if the end of the
input stream has been reached.
Read in some structured input, specified by a format specifier.
Read in some structured input, specified by a format specifier.
See class java.text.MessageFormat
for details of
the format specification.
Throws EOFException
if the end of the
input stream has been reached.
the format of the input.
a list of all extracted values.
Read in some structured input, specified by a format specifier.
Read in some structured input, specified by a format specifier.
Opposed to readf
, this function only returns the
first value extracted from the input according to the format
specification.
...
...
Read in some structured input, specified by a format specifier.
Read in some structured input, specified by a format specifier.
Opposed to readf
, this function only returns the
first two values extracted from the input according to the format
specification.
...
...
Read in some structured input, specified by a format specifier.
Read in some structured input, specified by a format specifier.
Opposed to readf
, this function only returns the
first three values extracted from the input according to the format
specification.
...
...
Set the default error stream.
Set the default error stream.
the new error stream.
Set the default error stream.
Set the default error stream.
the new error stream.
Set the default input stream.
Set the default input stream.
the new input stream.
Set the default input stream.
Set the default input stream.
specifies the new input stream.
Set the default output stream.
Set the default output stream.
the new output stream.
Set the default output stream.
Set the default output stream.
the new output stream.
Set the default error stream for the duration of execution of one thunk.
Set the default error stream for the duration of execution of one thunk.
the new error stream.
the code to execute with the new error stream active
...
Set the default error stream for the duration of execution of one thunk.
Set the default error stream for the duration of execution of one thunk.
the new error stream.
the code to execute with the new error stream active
...
Set the default input stream for the duration of execution of one thunk.
Set the default input stream for the duration of execution of one thunk.
the new input stream.
the code to execute with the new input stream active
Set the default input stream for the duration of execution of one thunk.
Set the default input stream for the duration of execution of one thunk.
the code to execute with the new input stream active
Set the default output stream for the duration of execution of one thunk.
Set the default output stream for the duration of execution of one thunk.
the new output stream.
the code to execute with the new output stream active
...
Set the default output stream for the duration of execution of one thunk.
Set the default output stream for the duration of execution of one thunk.
the new output stream.
the code to execute with the new output stream active
...
The
Console
object implements functionality for printing Scala values on the terminal. There are also functions for reading specific values.Console
also defines constants for marking up text on ANSI terminals.version
1.0, 03/09/2003