Package elki.result.textwriter
Interface StreamFactory
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
MultipleFilesOutput,SingleStreamOutput
public interface StreamFactory extends java.lang.AutoCloseableInterface for output handling (single file, multiple files, ...)Note: these classes need to be rewritten. Contributions welcome!
- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close stream factory.voidcloseStream(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.PrintStreamopenStream(java.lang.String label)Retrieve a print stream for output using the given label.
-
-
-
Method Detail
-
openStream
java.io.PrintStream openStream(java.lang.String label) throws java.io.IOExceptionRetrieve a print stream for output using the given label. Note that multiple labels MAY result in the same PrintStream, so you should be printing to only one stream at a time to avoid mixing outputs.- Parameters:
label- Output label.- Returns:
- stream object for the given label
- Throws:
java.io.IOException- on IO error
-
closeStream
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!)- Parameters:
stream- Stream to close
-
close
void close() throws java.io.IOExceptionClose stream factory.- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
-