blob: 402d068f9685e98037824c88e8f49aa037664c39 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package scala.tools.nsc
import java.io.Writer
/** A Writer that writes onto the Scala Console */
class ConsoleWriter extends Writer {
def close = flush
def flush = Console.flush
def write(cbuf: Array[char], off: int, len: int): Unit =
write(new String(cbuf.subArray(off, off+len-1)))
override def write(str: String): Unit = Console.print(str)
}
|