Chars

dotty.tools.io.Streamable.Chars
trait Chars extends 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.''

Attributes

Graph
Supertypes
trait Bytes
class Object
trait Matchable
class Any
Known subtypes
class File

Members list

Value members

Concrete methods

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

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

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

Attributes

Wraps a BufferedReader around the result of reader().

Wraps a BufferedReader around the result of reader().

Attributes

def chars(codec: Codec): BufferedSource

Caller is responsible for closing the returned BufferedSource.

Caller is responsible for closing the returned BufferedSource.

Attributes

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.

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.

Attributes

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

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

Attributes

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

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

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

Attributes

Obtains an InputStreamReader wrapped around a FileInputStream.

Obtains an InputStreamReader wrapped around a FileInputStream.

Attributes

def slurp(): String

Convenience function to import entire file into a String.

Convenience function to import entire file into a String.

Attributes

def slurp(codec: Codec): String

Inherited methods

Attributes

Inherited from:
Bytes
def bytes(): Iterator[Byte]

Attributes

Inherited from:
Bytes

Attributes

Inherited from:
Bytes

Attributes

Inherited from:
Bytes
def length: Long

Attributes

Inherited from:
Bytes

This method aspires to be the fastest way to read a stream of known length into memory.

This method aspires to be the fastest way to read a stream of known length into memory.

Attributes

Inherited from:
Bytes