scala.tools.nsc.ConsoleWriter.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.scala-compiler
Show all versions of org.apache.servicemix.bundles.scala-compiler
This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.
/* NSC -- new Scala compiler
* Copyright 2006-2011 LAMP/EPFL
* @author Martin Odersky
*/
package scala.tools.nsc
import java.io.Writer
/** A Writer that writes onto the Scala Console.
*
* @author Lex Spoon
* @version 1.0
*/
class ConsoleWriter extends Writer {
def close = flush
def flush = Console.flush
def write(cbuf: Array[Char], off: Int, len: Int) {
if (len > 0)
write(new String(cbuf.slice(off, off+len)))
}
override def write(str: String) { Console.print(str) }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy