public class SingleStreamOutput extends Object implements StreamFactory
Modifier and Type | Field and Description |
---|---|
private PrintStream |
stream
Output stream
|
Constructor and Description |
---|
SingleStreamOutput()
Constructor using stdout.
|
SingleStreamOutput(boolean gzip)
Constructor using stdout
|
SingleStreamOutput(File out)
Constructor with given file name.
|
SingleStreamOutput(File out,
boolean gzip)
Constructor with given file name.
|
SingleStreamOutput(FileDescriptor out)
Constructor with given FileDescriptor
|
SingleStreamOutput(FileDescriptor out,
boolean gzip)
Constructor with given FileDescriptor
|
SingleStreamOutput(FileOutputStream out)
Constructor with given FileOutputStream.
|
SingleStreamOutput(FileOutputStream out,
boolean gzip)
Constructor with given FileOutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
closeStream(PrintStream stream)
Close the given output stream (Note: when writing to a single stream
output, it will actually not be closed!)
|
PrintStream |
openStream(String filename)
Return the objects shared print stream.
|
private PrintStream stream
public SingleStreamOutput() throws IOException
IOException
- on IO errorpublic SingleStreamOutput(boolean gzip) throws IOException
gzip
- Use gzip compressionIOException
- on IO errorpublic SingleStreamOutput(File out) throws IOException
out
- filenameIOException
- on IO errorpublic SingleStreamOutput(File out, boolean gzip) throws IOException
out
- filenamegzip
- Use gzip compressionIOException
- on IO errorpublic SingleStreamOutput(FileDescriptor out) throws IOException
out
- file descriptorIOException
- on IO errorpublic SingleStreamOutput(FileDescriptor out, boolean gzip) throws IOException
out
- file descriptorgzip
- Use gzip compressionIOException
- on IO errorpublic SingleStreamOutput(FileOutputStream out) throws IOException
out
- File output streamIOException
- on IO errorpublic SingleStreamOutput(FileOutputStream out, boolean gzip) throws IOException
out
- File output streamgzip
- Use gzip compressionIOException
- on IO errorpublic PrintStream openStream(String filename)
openStream
in interface StreamFactory
filename
- ignored filename for SingleStreamOutput, as the name
suggestspublic void closeStream(PrintStream stream)
StreamFactory
closeStream
in interface StreamFactory
stream
- Stream to close