public interface FileSink extends Sink
File outputs can work in two modes:
Modifier and Type | Method and Description |
---|---|
void |
begin(OutputStream stream)
Begin the output of the given stream of graph events.
|
void |
begin(String fileName)
Begin the output of the given stream of graph events.
|
void |
begin(Writer writer)
Begin the output of the given stream of graph events.
|
void |
end()
End the writing process started with
begin(OutputStream) or
begin(String) . |
void |
flush()
Ensure all data sent to the output are correctly written.
|
void |
writeAll(Graph graph,
OutputStream stream)
Write the current graph state in one big non-interruptible operation.
|
void |
writeAll(Graph graph,
String fileName)
Write the current graph state in one big non-interruptible operation.
|
void |
writeAll(Graph graph,
Writer writer)
Write the current graph state in one big non-interruptible operation.
|
edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved
edgeAdded, edgeRemoved, graphCleared, nodeAdded, nodeRemoved, stepBegins
void writeAll(Graph graph, String fileName) throws IOException
begin(OutputStream)
or
begin(String)
as soon as the graph appears (or any source of
graph event, any descendant of Source
will do).graph
- The graph to send as events to the file.fileName
- Name of the file to write.IOException
- if an I/O error occurs while writing.void writeAll(Graph graph, OutputStream stream) throws IOException
begin(Writer)
or
begin(OutputStream)
or begin(String)
as soon as the
graph appears (or any source of graph event, any descendant of
Source
will do).graph
- The graph to send as events to the file.stream
- The stream where the graph is sent.IOException
- if an I/O error occurs while writing.void writeAll(Graph graph, Writer writer) throws IOException
begin(Writer)
or
begin(OutputStream)
or begin(String)
as soon as the
graph appears (or any source of graph event, any descendant of
Source
will do).graph
- The graph to send as events to the file.writer
- The writer where the graph is sent.IOException
- if an I/O error occurs while writing.void begin(String fileName) throws IOException
Source
or you can
directly use the methods inherited from Sink
. Once the writing is
started using begin(), you must close it using end()
when done
to ensure data is correctly stored in the file.fileName
- The name of the file where to output the graph events.IOException
- If an I/O error occurs while writing.void begin(OutputStream stream) throws IOException
Source
or you can
directly use the methods inherited from Sink
. Once the writing is
started using begin(), you must close it using end()
when done
to ensure data is correctly stored in the file.stream
- The file stream where to output the graph events.IOException
- If an I/O error occurs while writing.void begin(Writer writer) throws IOException
Source
or you can
directly use the methods inherited from Sink
. Once the writing is
started using begin(), you must close it using end()
when done
to ensure data is correctly stored in the file.writer
- The writer where to output the graph events.IOException
- If an I/O error occurs while writing.void flush() throws IOException
IOException
- If an I/O error occurs during write.void end() throws IOException
begin(OutputStream)
or
begin(String)
.IOException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses