Scala Library
|
|
scala/io/Source.scala
]
object
Source
extends
AnyRefValue Summary | |
val
|
DefaultBufSize : Int |
val
|
NoReset : () => Source |
Method Summary | |
def
|
fromBytes
(bytes : Array[Byte])(implicit codec : Codec) : Source
Create a
Source from array of bytes, with
empty description. |
def
|
fromChar
(c : Char) : Source
Creates a
Source instance from a single character. |
def
|
fromChars
(chars : Array[Char]) : Source
creates Source from array of characters, with empty description.
|
def
|
fromFile
(file : java.io.File, bufferSize : Int)(implicit codec : Codec) : Source
Creates Source from
file , using given character encoding,
setting its description to filename. Input is buffered in a buffer of
size bufferSize . |
def
|
fromInputStream
(inputStream : java.io.InputStream)(implicit codec : Codec) : Source
same as BufferedSource.fromInputStream(is)
|
def
|
fromIterable (iterable : Iterable[Char]) : Source |
def
|
fromPath
(name : java.lang.String)(implicit codec : Codec) : Source
creates Source from file with given name, setting
its description to filename.
|
def
|
fromString
(s : java.lang.String) : Source
creates Source from string, with empty description.
|
def
|
fromURI
(uri : java.net.URI)(implicit codec : Codec) : Source
creates
Source from file with given file: URI |
def
|
fromURL
(url : java.net.URL)(implicit codec : Codec) : Source
same as fromInputStream(url.openStream(), enc)
|
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Value Details |
Method Details |
Source
instance from a single character.c -
...Source
instance.chars -
...
def
fromString(s : java.lang.String) : Source
s -
...Source
from array of bytes, with
empty description.bytes -
...enc -
...Source
instance.
def
fromPath(name : java.lang.String)(implicit
codec : Codec) : Source
def
fromURI(uri : java.net.URI)(implicit
codec : Codec) : Source
Source
from file with given file: URI
def
fromFile(file : java.io.File, bufferSize : Int)(implicit
codec : Codec) : Source
file
, using given character encoding,
setting its description to filename. Input is buffered in a buffer of
size bufferSize
.
def
fromURL(url : java.net.URL)(implicit
codec : Codec) : Source
def
fromInputStream(inputStream : java.io.InputStream)(implicit
codec : Codec) : Source
Scala Library
|
|