scalax.io

object StreamHelp

[source: scalax/io/StreamHelp.scala]

object StreamHelp
extends AnyRef
Method Summary
def ensureBuffered (r : java.io.Reader) : java.io.BufferedReader
Wrap this Reader into a BufferedReader if it isn't one already.
def lines (br : java.io.BufferedReader) : scala.Iterator[java.lang.String]
Iterates over the lines of the reader. Keeps reader open even after reaching EOF, reader must be closed explicitly.
def lines (in : java.io.Reader) : scala.Iterator[java.lang.String]
Iterates over the lines of the reader.
def pump (in : java.io.InputStream, out : java.io.OutputStream) : Int
Pumps all data from the input stream through to the output stream. Returns the number of bytes transferred.
def pump (in : java.io.Reader, out : java.io.Writer) : Int
Pumps all data from the reader through to the writer. Returns the number of characters transferred.
def slurp (in : java.io.InputStream) : scala.Array[Byte]
Slurps the entire input stream into a byte array.
def slurp (in : java.io.Reader) : java.lang.String
Slurps the entire input stream into a string.
def unzip (zip : java.io.InputStream, outdir : java.io.File) : Unit
Unzips the contents of the supplied stream into the specified directory.
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
def slurp(in : java.io.InputStream) : scala.Array[Byte]
Slurps the entire input stream into a byte array.

def slurp(in : java.io.Reader) : java.lang.String
Slurps the entire input stream into a string.

def pump(in : java.io.InputStream, out : java.io.OutputStream) : Int
Pumps all data from the input stream through to the output stream. Returns the number of bytes transferred.

def pump(in : java.io.Reader, out : java.io.Writer) : Int
Pumps all data from the reader through to the writer. Returns the number of characters transferred.

def lines(br : java.io.BufferedReader) : scala.Iterator[java.lang.String]
Iterates over the lines of the reader. Keeps reader open even after reaching EOF, reader must be closed explicitly.

def lines(in : java.io.Reader) : scala.Iterator[java.lang.String]
Iterates over the lines of the reader.

def ensureBuffered(r : java.io.Reader) : java.io.BufferedReader
Wrap this Reader into a BufferedReader if it isn't one already.

def unzip(zip : java.io.InputStream, outdir : java.io.File) : Unit
Unzips the contents of the supplied stream into the specified directory.


Copyright (c) 2005-8 The Scalax Project. All Rights Reserved.