in scala/io
object Source

object Source
extends Object
with ScalaObject

convenience methods to create an iterable representation of a source file
Author:
buraq

Method Summary
final def fromBytes(bytes: Array[Byte]): Source
     creates Source from array of bytes, with empty description
final def fromBytes(bytes: Array[Byte], enc: String): Source
     creates Source from array of bytes with given encoding, with empty description
final def fromChars(chars: Array[Char]): Source
     creates Source from array of characters, with empty description
final def fromFile(name: String): Source
     creates Source from file with given name, setting its description to filename.
final def fromFile(name: String, enc: String): Source
     creates Source from file with given name, using given encoding, setting its description to filename.
final def fromFile(uri: java.net.URI): Source
     creates Source from file with given file: URI
final def fromFile(file: java.io.File): Source
     creates Source from file, using default character encoding, setting its description to filename.
final def fromFile(file: java.io.File, enc: String): Source
     creates Source from file, using given character encoding, setting its description to filename.
final def fromString(s: String): Source
     creates Source from string, with empty description
final def fromURL(s: String): Source
final def fromURL(url: java.net.URL): Source
final def setFileDescriptor(file: java.io.File, s: Source): Source

Method Detail

fromBytes

  final def fromBytes(bytes: Array[Byte]): Source
creates Source from array of bytes, with empty description

fromBytes

  final def fromBytes(bytes: Array[Byte], enc: String): Source
creates Source from array of bytes with given encoding, with empty description

fromChars

  final def fromChars(chars: Array[Char]): Source
creates Source from array of characters, with empty description

fromString

  final def fromString(s: String): Source
creates Source from string, with empty description

fromFile

  final def fromFile(name: String): Source
creates Source from file with given name, setting its description to filename.

fromFile

  final def fromFile(name: String, enc: String): Source
creates Source from file with given name, using given encoding, setting its description to filename.

fromFile

  final def fromFile(uri: java.net.URI): Source
creates Source from file with given file: URI

fromFile

  final def fromFile(file: java.io.File): Source
creates Source from file, using default character encoding, setting its description to filename.

fromFile

  final def fromFile(file: java.io.File, enc: String): Source
creates Source from file, using given character encoding, setting its description to filename.

setFileDescriptor

  final def setFileDescriptor(file: java.io.File, s: Source): Source

fromURL

  final def fromURL(s: String): Source

fromURL

  final def fromURL(url: java.net.URL): Source