Dotty Documentation

0.4.0-bin-SNAPSHOT

object Streamable

Traits for objects which can be represented as Streams.

[-] Constructors

[-] Members

[+] trait Bytes

Traits which can be viewed as a sequence of bytes. Source types which know their length should override def length: Long for more efficient method implementations.

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

Note that this code was not written with resource management in mind. Several methods (such as chars and lines) create InputStreams they don't close

[+] trait Chars

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.''

[+] def bytes ( is: => InputStream ) : Array [ Byte ]
[+] def closing ( stream: T ) ( f: T => U ) : U

Call a function on something Closeable, finally closing it.

[+] def slurp ( is: => InputStream ) ( implicit codec: Codec ) : String
[+] def slurp ( url: URL ) ( implicit codec: Codec ) : String