All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.io.TextWriter

java.lang.Object
   |
   +----java.io.Writer
           |
           +----java.io.OutputStreamWriter
                   |
                   +----JSci.io.TextWriter

public final class TextWriter
extends OutputStreamWriter
Text writer, writes data text files/streams. This class uses buffered I/O.


Constructor Index

 o TextWriter(File, char)
Writes to a text file with the specified File object.
 o TextWriter(OutputStream)
Writes text data to an output stream.
 o TextWriter(String, char)
Writes to a text file with the specified system dependent file name.

Method Index

 o close()
Close the stream.
 o write(double[])
Writes an array of data.
 o write(double[][])
Writes an array of data.
 o write(DoubleMatrix)
Writes a matrix.
 o write(int)
Writes a single character.
 o write(int[])
Writes an array of data.
 o write(int[][])
Writes an array of data.
 o write(IntegerMatrix)
Writes a matrix.
 o write(String)
Writes a string.

Constructors

 o TextWriter
 public TextWriter(OutputStream stream)
Writes text data to an output stream.

 o TextWriter
 public TextWriter(String name,
                   char ch) throws IOException
Writes to a text file with the specified system dependent file name.

Parameters:
name - the system dependent file name
ch - the character that delimits data columns
Throws: IOException
If the file is not found.
 o TextWriter
 public TextWriter(File file,
                   char ch) throws IOException
Writes to a text file with the specified File object.

Parameters:
file - the file to be opened for writing
ch - the character that delimits data columns
Throws: IOException
If the file is not found.

Methods

 o write
 public void write(int c) throws IOException
Writes a single character.

Throws: IOException
If an I/O error occurs
Overrides:
write in class OutputStreamWriter
 o write
 public void write(String str) throws IOException
Writes a string.

Throws: IOException
If an I/O error occurs
Overrides:
write in class Writer
 o close
 public void close() throws IOException
Close the stream.

Throws: IOException
If an I/O error occurs
Overrides:
close in class OutputStreamWriter
 o write
 public void write(double data[]) throws IOException
Writes an array of data.

Parameters:
data - the data to be written
Throws: IOException
If an I/O error occurs
 o write
 public void write(double data[][]) throws IOException
Writes an array of data.

Parameters:
data - the data to be written
Throws: IOException
If an I/O error occurs
 o write
 public void write(int data[]) throws IOException
Writes an array of data.

Parameters:
data - the data to be written
Throws: IOException
If an I/O error occurs
 o write
 public void write(int data[][]) throws IOException
Writes an array of data.

Parameters:
data - the data to be written
Throws: IOException
If an I/O error occurs
 o write
 public void write(DoubleMatrix matrix) throws IOException
Writes a matrix.

Parameters:
matrix - the matrix to be written
Throws: IOException
If an I/O error occurs
 o write
 public void write(IntegerMatrix matrix) throws IOException
Writes a matrix.

Parameters:
matrix - the matrix to be written
Throws: IOException
If an I/O error occurs

All Packages  Class Hierarchy  This Package  Previous  Next  Index