in scala
object Console

`object` Console
  `extends` java.lang.Object
  `with` scala.ScalaObject

  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.

Author:
  Matthias Zenger
Version:
  1.0, 03/09/2003

Constructor Summary
| `def` this

Val Summary
`final` | `val` BLACK : java.lang.String("\033[30m")
`final` | `val` BLACK_B : java.lang.String("\033[40m")
`final` | `val` BLINK : java.lang.String("\033[5m")
`final` | `val` BLUE : java.lang.String("\033[34m")
`final` | `val` BLUE_B : java.lang.String("\033[44m")
`final` | `val` BOLD : java.lang.String("\033[1m")
`final` | `val` CYAN : java.lang.String("\033[36m")
`final` | `val` CYAN_B : java.lang.String("\033[46m")
`final` | `val` GREEN : java.lang.String("\033[32m")
`final` | `val` GREEN_B : java.lang.String("\033[42m")
`final` | `val` INVISIBLE : java.lang.String("\033[8m")
`final` | `val` MAGENTA : java.lang.String("\033[35m")
`final` | `val` MAGENTA_B : java.lang.String("\033[45m")
`final` | `val` RED : java.lang.String("\033[31m")
`final` | `val` RED_B : java.lang.String("\033[41m")
`final` | `val` RESET : java.lang.String("\033[0m")
`final` | `val` REVERSED : java.lang.String("\033[7m")
`final` | `val` UNDERLINED : java.lang.String("\033[4m")
`final` | `val` WHITE : java.lang.String("\033[37m")
`final` | `val` WHITE_B : java.lang.String("\033[47m")
`final` | `val` YELLOW : java.lang.String("\033[33m")
`final` | `val` YELLOW_B : java.lang.String("\033[43m")

Def Summary
| `def` flush : scala.Unit 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.
| `def` in : java.io.BufferedReader
| `def` out : java.io.PrintStream
| `def` print (obj: scala.Any) : scala.Unit Print an object on the terminal.
| `def` printf (text: java.lang.String)(args: scala.Any*) : scala.Unit Format and print out some text (in a fashion similar to printf in C). The format of the text to print is specified by the parameter `text`. The arguments that are inserted into specific locations in `text` are provided with parameter `args`. See class `java.text.MessageFormat` for a full specification of the format syntax.
| `def` println (x: scala.Any) : scala.Unit Print out an object followed by a new line character.
| `def` println : scala.Unit Print a new line character on the terminal.
| `def` readBoolean : scala.Boolean Read a boolean value from the terminal.
| `def` readByte : scala.Byte Read a byte value from the terminal.
| `def` readChar : scala.Char Read a char value from the terminal.
| `def` readDouble : scala.Double Read a double value from the terminal.
| `def` readFloat : scala.Float Read a float value from the terminal.
| `def` readInt : scala.Int Read an int value from the terminal.
| `def` readLine : java.lang.String Read a full line from the terminal.
| `def` readShort : scala.Short Read a short value from the terminal.
| `def` readf (format: java.lang.String) : scala.List[scala.Any] Read in some structured input, specified by a format specifier. See class `java.text.MessageFormat` for details of the format specification.
| `def` readf1 (format: java.lang.String) : scala.Any 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.
| `def` readf2 (format: java.lang.String) : scala.Tuple2[scala.Any, scala.Any] 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.
| `def` readf3 (format: java.lang.String) : scala.Tuple3[scala.Any, scala.Any, scala.Any] 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.
| `def` setIn (in: java.io.InputStream) : scala.Unit Set the default input stream.
| `def` setIn (reader: java.io.Reader) : scala.Unit Set the default input stream.
| `def` setOut (out: java.io.OutputStream) : scala.Unit Set the default output stream. @param@ out the new output stream.
| `def` setOut (out: java.io.PrintStream) : scala.Unit Set the default output stream.
| `def` withIn [T] (in: java.io.InputStream)(thunk: => T) : T Set the default input stream for the duration of execution of one thunk.
| `def` withIn [T] (reader: java.io.Reader)(thunk: => T) : T Set the default input stream for the duration of execution of one thunk.
| `def` withOut [T] (out: java.io.OutputStream)(thunk: => T) : T Set the default output stream for the duration of execution of one thunk.
| `def` withOut [T] (out: java.io.PrintStream)(thunk: => T) : T Set the default output stream for the duration of execution of one thunk.

Constructor Detail

`def` this

Val Detail

`final val` BLACK : java.lang.String("\033[30m")

`final val` BLACK_B : java.lang.String("\033[40m")

`final val` BLINK : java.lang.String("\033[5m")

`final val` BLUE : java.lang.String("\033[34m")

`final val` BLUE_B : java.lang.String("\033[44m")

`final val` BOLD : java.lang.String("\033[1m")

`final val` CYAN : java.lang.String("\033[36m")

`final val` CYAN_B : java.lang.String("\033[46m")

`final val` GREEN : java.lang.String("\033[32m")

`final val` GREEN_B : java.lang.String("\033[42m")

`final val` INVISIBLE : java.lang.String("\033[8m")

`final val` MAGENTA : java.lang.String("\033[35m")

`final val` MAGENTA_B : java.lang.String("\033[45m")

`final val` RED : java.lang.String("\033[31m")

`final val` RED_B : java.lang.String("\033[41m")

`final val` RESET : java.lang.String("\033[0m")

`final val` REVERSED : java.lang.String("\033[7m")

`final val` UNDERLINED : java.lang.String("\033[4m")

`final val` WHITE : java.lang.String("\033[37m")

`final val` WHITE_B : java.lang.String("\033[47m")

`final val` YELLOW : java.lang.String("\033[33m")

`final val` YELLOW_B : java.lang.String("\033[43m")

Def Detail

`def` flush : scala.Unit

  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.

`def` in : java.io.BufferedReader

`def` out : java.io.PrintStream

`def` print (obj: scala.Any): scala.Unit

  Print an object on the terminal.

Parameters:
  `obj -` the object to print.

`def` printf (text: java.lang.String)(args: scala.Any*): scala.Unit

  Format and print out some text (in a fashion similar to printf in C). The format of the text to print is specified by the parameter `text`. The arguments that are inserted into specific locations in `text` are provided with parameter `args`. See class `java.text.MessageFormat` for a full specification of the format syntax.

Parameters:
  `text -` the format of the text to print out.
Parameters:
  `args -` the parameters used to instantiate the format.

`def` println (x: scala.Any): scala.Unit

  Print out an object followed by a new line character.

Parameters:
  `x -` the object to print.

`def` println : scala.Unit

  Print a new line character on the terminal.

`def` readBoolean : scala.Boolean

  Read a boolean value from the terminal.

Returns:
  the boolean value read from the terminal.

`def` readByte : scala.Byte

  Read a byte value from the terminal.

`def` readChar : scala.Char

  Read a char value from the terminal.

`def` readDouble : scala.Double

  Read a double value from the terminal.

`def` readFloat : scala.Float

  Read a float value from the terminal.

`def` readInt : scala.Int

  Read an int value from the terminal.

`def` readLine : java.lang.String

  Read a full line from the terminal.

Returns:
  the string read from the terminal.

`def` readShort : scala.Short

  Read a short value from the terminal.

`def` readf (format: java.lang.String): scala.List[scala.Any]

  Read in some structured input, specified by a format specifier. See class `java.text.MessageFormat` for details of the format specification.

Parameters:
  `format -` the format of the input.
Returns:
  a list of all extracted values.

`def` readf1 (format: java.lang.String): scala.Any

  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.

Parameters:
  `format -` ...
Returns:
  ...

`def` readf2 (format: java.lang.String): scala.Tuple2[scala.Any, scala.Any]

  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.

Parameters:
  `format -` ...
Returns:
  ...

`def` readf3 (format: java.lang.String): scala.Tuple3[scala.Any, scala.Any, scala.Any]

  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.

Parameters:
  `format -` ...
Returns:
  ...

`def` setIn (in: java.io.InputStream): scala.Unit

  Set the default input stream.

Parameters:
  `in -` the new input stream.

`def` setIn (reader: java.io.Reader): scala.Unit

  Set the default input stream.

Parameters:
  `reader -` specifies the new input stream.

`def` setOut (out: java.io.OutputStream): scala.Unit

  Set the default output stream. @param@ out the new output stream.

`def` setOut (out: java.io.PrintStream): scala.Unit

  Set the default output stream.

Parameters:
  `out -` the new output stream.

`def` withIn [T](in: java.io.InputStream)(thunk: => T): T

  Set the default input stream for the duration of execution of one thunk.

Parameters:
  `in -` the new input stream.
Parameters:
  `thunk -` the code to execute with the new input stream active

`def` withIn [T](reader: java.io.Reader)(thunk: => T): T

  Set the default input stream for the duration of execution of one thunk.

Parameters:
  `in -` the new input stream.
Parameters:
  `thunk -` the code to execute with the new input stream active

`def` withOut [T](out: java.io.OutputStream)(thunk: => T): T

  Set the default output stream for the duration of execution of one thunk.

Parameters:
  `out -` the new output stream.
Parameters:
  `thunk -` the code to execute with the new output stream active
Returns:
  ...

`def` withOut [T](out: java.io.PrintStream)(thunk: => T): T

  Set the default output stream for the duration of execution of one thunk.

Parameters:
  `out -` the new output stream.
Parameters:
  `thunk -` the code to execute with the new output stream active
Returns:
  ...