public class SingleStreamOutput extends java.lang.Object implements StreamFactory
| Modifier and Type | Field and Description |
|---|---|
private java.io.PrintStream |
stream
Output stream
|
| Constructor and Description |
|---|
SingleStreamOutput()
Constructor using stdout.
|
SingleStreamOutput(boolean gzip)
Constructor using stdout
|
SingleStreamOutput(java.io.File out)
Constructor with given file name.
|
SingleStreamOutput(java.io.File out,
boolean gzip)
Constructor with given file name.
|
SingleStreamOutput(java.io.FileDescriptor out)
Constructor with given FileDescriptor
|
SingleStreamOutput(java.io.FileDescriptor out,
boolean gzip)
Constructor with given FileDescriptor
|
SingleStreamOutput(java.io.FileOutputStream out)
Constructor with given FileOutputStream.
|
SingleStreamOutput(java.io.FileOutputStream out,
boolean gzip)
Constructor with given FileOutputStream.
|
SingleStreamOutput(java.io.PrintStream os)
Constructor with a print stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close stream factory.
|
void |
closeStream(java.io.PrintStream stream)
Close the given output stream (Note: when writing to a single stream
output, it will actually not be closed!)
|
java.io.PrintStream |
openStream(java.lang.String filename)
Return the objects shared print stream.
|
public SingleStreamOutput()
throws java.io.IOException
java.io.IOException - on IO errorpublic SingleStreamOutput(boolean gzip)
throws java.io.IOException
gzip - Use gzip compressionjava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.File out)
throws java.io.IOException
out - filenamejava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.File out,
boolean gzip)
throws java.io.IOException
out - filenamegzip - Use gzip compressionjava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.FileDescriptor out)
throws java.io.IOException
out - file descriptorjava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.FileDescriptor out,
boolean gzip)
throws java.io.IOException
out - file descriptorgzip - Use gzip compressionjava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.FileOutputStream out)
throws java.io.IOException
out - File output streamjava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.FileOutputStream out,
boolean gzip)
throws java.io.IOException
out - File output streamgzip - Use gzip compressionjava.io.IOException - on IO errorpublic SingleStreamOutput(java.io.PrintStream os)
os - Output streampublic java.io.PrintStream openStream(java.lang.String filename)
openStream in interface StreamFactoryfilename - ignored filename for SingleStreamOutput, as the name
suggestspublic void closeStream(java.io.PrintStream stream)
StreamFactorycloseStream in interface StreamFactorystream - Stream to closepublic void close()
throws java.io.IOException
StreamFactoryclose in interface StreamFactoryclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2019 ELKI Development Team. License information.