|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.output.MultipleOutput
public class MultipleOutput
The MultipleOutput
to support more than one output formats. This class aggregates multiple outputs and delegates all
DuDeOutput
operations to each of the aggregated DuDeOutputs
.
Constructor Summary | |
---|---|
MultipleOutput()
The default constructor initialized the MultipleOutput . |
|
MultipleOutput(DuDeOutput... outputs)
The default constructor initialized the MultipleOutput . |
Method Summary | |
---|---|
boolean |
addOutput(DuDeOutput output)
Adds an output to the list of DuDeOutput s. |
void |
close()
Closes the stream. |
MultipleOutput |
withData()
Enables printing the data. |
MultipleOutput |
withoutData()
Disables printing the data. |
void |
write(DuDeObjectPair pair)
Writes the DuDeObjectPair onto an stream. |
void |
writeDuplicatesOnly(DuDeObjectPair pair)
Writes the passed DuDeObjectPair onto the stream, if it is flagged as a duplicate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultipleOutput(DuDeOutput... outputs)
MultipleOutput
.
outputs
- The outputs that shall be added.public MultipleOutput()
MultipleOutput
.
Method Detail |
---|
public boolean addOutput(DuDeOutput output)
DuDeOutput
s.
output
- The output to add.
True
if output was added successfully, false
otherwise.public void close() throws IOException
DuDeOutput
close
in interface DuDeOutput
IOException
- If an error occurs while closing the stream.public void write(DuDeObjectPair pair) throws IOException
DuDeOutput
DuDeObjectPair
onto an stream.
write
in interface DuDeOutput
pair
- A pair of two DuDeObject
s that are written into an OutputStream
.
IOException
- If an error occurs while writing onto the stream.public void writeDuplicatesOnly(DuDeObjectPair pair) throws IOException
DuDeOutput
DuDeObjectPair
onto the stream, if it is flagged as a duplicate.
writeDuplicatesOnly
in interface DuDeOutput
pair
- The pair that shall be written to the stream.
IOException
- If an error occurs while writing onto the stream.DuDeObjectPair.getDuplicateInfo()
public MultipleOutput withData()
DuDeOutput
withData
in interface DuDeOutput
public MultipleOutput withoutData()
DuDeOutput
withoutData
in interface DuDeOutput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |