EasyWriter

scalation.EasyWriter
class EasyWriter(project: String, filename: String, var toFile: Boolean) extends Writer

The EasyWriter class makes it easy to switch between writing to standard output and a (log) file.

Value parameters

filename

the name of the file to be written

project

the project or directory involved

toFile

flag indicating whether to write to a file

Attributes

Graph
Supertypes
class Writer
trait Flushable
trait Closeable
trait AutoCloseable
trait Appendable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def close(): Unit

Close the file (not applicable to standard output).

Close the file (not applicable to standard output).

Attributes

def finish(): Unit

Finish by calling flush and close.

Finish by calling flush and close.

Attributes

def flush(): Unit

Flush (force write) the output to the file.

Flush (force write) the output to the file.

Attributes

def println(s: String): Unit

Print/write the string s and add a newline ('\n') at the end.

Print/write the string s and add a newline ('\n') at the end.

Value parameters

s

the string to printed/written

Attributes

def println(): Unit

Print/write a newline ('\n').

Print/write a newline ('\n').

Attributes

def toggle(): Unit

Toggle between writing to a file and standard output.

Toggle between writing to a file and standard output.

Attributes

def write(cbuf: Array[Char], off: Int, len: Int): Unit

Write the character buffer.

Write the character buffer.

Value parameters

cbuf

the character buffer

len

the length/number of characters to write

off

the offset in 'cbuf' to starting writing

Attributes

Inherited methods

def append(x$0: Char): Writer

Attributes

Inherited from:
Writer
def append(x$0: CharSequence, x$1: Int, x$2: Int): Writer

Attributes

Inherited from:
Writer
def append(x$0: CharSequence): Writer

Attributes

Inherited from:
Writer
def write(x$0: String, x$1: Int, x$2: Int): Unit

Attributes

Inherited from:
Writer
def write(x$0: String): Unit

Attributes

Inherited from:
Writer
def write(x$0: Array[Char]): Unit

Attributes

Inherited from:
Writer
def write(x$0: Int): Unit

Attributes

Inherited from:
Writer