Dotty Documentation

0.14.0-bin-SNAPSHOT

trait Chars
extends Object with Bytes

For objects which can be viewed as Chars.

''Note: This library is considered experimental and should not be used unless you know what you are doing.''

[-] Constructors

[-] Members

[+] def applyReader ( f: BufferedReader => T ) : T

Creates a BufferedReader and applies the closure, automatically closing it on completion.

[+] def bufferedReader ( ) : BufferedReader

Wraps a BufferedReader around the result of reader().

[+] def bufferedReader ( codec: Codec ) : BufferedReader
[+] def chars ( codec: Codec ) : BufferedSource

Caller is responsible for closing the returned BufferedSource.

[+] def creationCodec : Codec

Calls to methods requiring byte<->char transformations should be offered in a form which allows specifying the codec. When it is not specified, the one discovered at creation time will be used, which will always find the one in scala.io.Codec if no other is available. This can be overridden to use a different default.

[+] def lines ( ) : Iterator [ String ]

Beware! Leaks an InputStream which will not be closed until it gets finalized.

[+] def lines ( codec: Codec ) : Iterator [ String ]

Beware! Leaks an InputStream which will not be closed until it gets finalized.

[+] def reader ( codec: Codec ) : InputStreamReader

Obtains an InputStreamReader wrapped around a FileInputStream.

[+] def slurp ( ) : String

Convenience function to import entire file into a String.

[+] def slurp ( codec: Codec ) : String