public abstract class AbstractStreamTableWriter extends AbstractTableWriter
| Constructor and Description |
|---|
AbstractStreamTableWriter()
Default Constructor.
|
AbstractStreamTableWriter(File file)
Create a new instance from a file object.
|
AbstractStreamTableWriter(OutputStream out)
Create a new instance from an existing OutputStream.
|
AbstractStreamTableWriter(String file)
Create a new instance froma file name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the writer and its underlying streams.
|
protected OutputStreamWriter |
createOutputStreamWriter(OutputStream out)
Creates the stream writer for the printer.
|
protected PrintWriter |
createWriter()
Creates the print writer for the output.
|
CharsetEncoder |
getCharsetEncoder()
Returns the encoder being used for the output.
|
OutputStream |
getOutputStream()
Returns the underlying output stream
|
PrintWriter |
getWriter()
Returns a writer object for convinience.
|
void |
setCharset(Charset charset)
Sets the charset being used for output.
|
void |
setCharset(String charset)
Sets the charset being used for output.
|
void |
setCharsetEncoder(CharsetEncoder charsetEncoder)
Sets the charset encoder being used.
|
void |
setOutputStream(OutputStream out)
Sets the underlying stream.
|
convert, convert, getRowCount, getTypeConversionHandler, incrementRowCount, init, printComment, printComment, printRow, printRow, printRow, registerTypeConversionHandler, unregisterTypeConversionHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprintRowpublic AbstractStreamTableWriter()
public AbstractStreamTableWriter(OutputStream out)
out - - the stream to write to.public AbstractStreamTableWriter(File file) throws IOException
file - - file to write data to.IOException - - when the file could not be createdpublic AbstractStreamTableWriter(String file) throws IOException
file - - file to write data to.IOException - - when the file could not be createdpublic void setOutputStream(OutputStream out)
out - the output stream to be usedpublic PrintWriter getWriter()
protected PrintWriter createWriter()
createOutputStreamWriter(OutputStream)
for the creation of the underlying writer.protected OutputStreamWriter createOutputStreamWriter(OutputStream out)
out - the underlying output streampublic CharsetEncoder getCharsetEncoder()
public void setCharsetEncoder(CharsetEncoder charsetEncoder)
charsetEncoder - the charset encoder to setpublic void setCharset(Charset charset)
charset - the charset to setpublic void setCharset(String charset)
charset - the charset to setpublic OutputStream getOutputStream()
public void close()
close in interface TableWriterclose in class AbstractTableWriterCopyright © 2014. All rights reserved.