Scala Library Documentation
|
|
scala/io/Source.scala
]
object
Source
extends
AnyRefMethod Summary | |
def
|
fromBytes
(bytes : Array[Byte], enc : java.lang.String) : Source
Creates Source from array of bytes with given encoding, with
empty description.
|
def
|
fromBytes
(bytes : Array[Byte]) : Source
Creates a
Source instance from the given 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
(name : java.lang.String) : Source
creates Source from file with given name, setting its description to
filename.
|
def
|
fromFile
(file : java.io.File, enc : java.lang.String) : Source
Creates Source from file, using given character encoding, setting its
description to filename.
|
def
|
fromFile
(file : java.io.File) : Source
creates Source from file, using default character encoding, setting its
description to filename.
|
def
|
fromFile
(uri : java.net.URI) : Source
creates Source from file with given file: URI
|
def
|
fromFile
(name : java.lang.String, enc : java.lang.String) : Source
creates Source from file with given name, using given encoding, setting
its description to filename.
|
def
|
fromInputStream
(is : java.io.InputStream) : Source
same as fromInputStream(is, "utf-8", None)
|
def
|
fromInputStream
(is : java.io.InputStream, enc : java.lang.String) : Source
same as fromInputStream(is, enc, None)
|
def
|
fromInputStream
(istream : java.io.InputStream, enc : java.lang.String, maxlen : Option[Int]) : Source
reads data from inputstream into a byte array, and calls fromBytes with given encoding.
If maxlen is given, reads not more bytes than maxlen. if maxlen was not given, or was <= 0, then
whole inputstream is read and closed afterwards.
|
def
|
fromString
(s : java.lang.String) : Source
creates Source from string, with empty description.
|
def
|
fromURL (s : java.lang.String) : Source |
def
|
fromURL (url : java.net.URL) : Source |
def
|
setFileDescriptor (file : java.io.File, s : Source) : Source |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
Source
instance from the given array of bytes,
with empty description.bytes -
...Source
instance.
def
fromBytes(bytes : Array[Byte], enc : java.lang.String) : Source
bytes -
...enc -
...Source
instance from a single character.c -
...Source
instance.chars -
...
def
fromString(s : java.lang.String) : Source
s -
...
def
fromFile(name : java.lang.String) : Source
def
fromFile(name : java.lang.String, enc : java.lang.String) : Source
def
fromFile(uri : java.net.URI) : Source
def
fromFile(file : java.io.File) : Source
def
fromFile(file : java.io.File, enc : java.lang.String) : Source
file -
...enc -
...
def
setFileDescriptor(file : java.io.File, s : Source) : Source
file -
...s -
...
def
fromURL(s : java.lang.String) : Source
s -
...
def
fromURL(url : java.net.URL) : Source
url -
...
def
fromInputStream(istream : java.io.InputStream, enc : java.lang.String, maxlen : Option[Int]) : Source
istream -
the input stream from which to readenc -
the encoding to apply to the bytesmaxlen -
optionally, a positive int specifying maximum number of bytes to read
def
fromInputStream(is : java.io.InputStream, enc : java.lang.String) : Source
def
fromInputStream(is : java.io.InputStream) : Source
Scala Library Documentation
|
|