public final class TextWriter
extends java.io.OutputStreamWriter
Constructor and Description |
---|
TextWriter(java.io.File file,
char ch)
Writes to a text file with the specified File object.
|
TextWriter(java.io.OutputStream stream)
Writes text data to an output stream.
|
TextWriter(java.lang.String name,
char ch)
Writes to a text file with the specified system dependent file name.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the stream.
|
void |
write(double[] data)
Writes an array of data.
|
void |
write(double[][] data)
Writes an array of data.
|
void |
write(DoubleMatrix matrix)
Writes a matrix.
|
void |
write(int c)
Writes a single character.
|
void |
write(int[] data)
Writes an array of data.
|
void |
write(int[][] data)
Writes an array of data.
|
void |
write(IntegerMatrix matrix)
Writes a matrix.
|
void |
write(java.lang.String str)
Writes a string.
|
public TextWriter(java.io.OutputStream stream)
public TextWriter(java.lang.String name, char ch) throws java.io.IOException
name
- the system dependent file name.ch
- the character that delimits data columns.java.io.IOException
- If the file is not found.public TextWriter(java.io.File file, char ch) throws java.io.IOException
file
- the file to be opened for writing.ch
- the character that delimits data columns.java.io.IOException
- If the file is not found.public void write(int c) throws java.io.IOException
write
in class java.io.OutputStreamWriter
java.io.IOException
- If an I/O error occurs.public void write(java.lang.String str) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
- If an I/O error occurs.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStreamWriter
java.io.IOException
- If an I/O error occurs.public void write(double[] data) throws java.io.IOException
data
- the data to be written.java.io.IOException
- If an I/O error occurs.public void write(double[][] data) throws java.io.IOException
data
- the data to be written.java.io.IOException
- If an I/O error occurs.public void write(int[] data) throws java.io.IOException
data
- the data to be written.java.io.IOException
- If an I/O error occurs.public void write(int[][] data) throws java.io.IOException
data
- the data to be written.java.io.IOException
- If an I/O error occurs.public void write(DoubleMatrix matrix) throws java.io.IOException
matrix
- the matrix to be written.java.io.IOException
- If an I/O error occurs.public void write(IntegerMatrix matrix) throws java.io.IOException
matrix
- the matrix to be written.java.io.IOException
- If an I/O error occurs.