public interface FileSink extends Sink
File outputs can work in two modes:
Modifier and Type | Method and Description |
---|---|
void |
begin(java.io.OutputStream stream)
Begin the output of the given stream of graph events.
|
void |
begin(java.lang.String fileName)
Begin the output of the given stream of graph events.
|
void |
begin(java.io.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,
java.io.OutputStream stream)
Write the current graph state in one big non-interruptible operation.
|
void |
writeAll(Graph graph,
java.lang.String fileName)
Write the current graph state in one big non-interruptible operation.
|
void |
writeAll(Graph graph,
java.io.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, java.lang.String fileName) throws java.io.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.java.io.IOException
- if an I/O error occurs while writing.void writeAll(Graph graph, java.io.OutputStream stream) throws java.io.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.java.io.IOException
- if an I/O error occurs while writing.void writeAll(Graph graph, java.io.Writer writer) throws java.io.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.java.io.IOException
- if an I/O error occurs while writing.void begin(java.lang.String fileName) throws java.io.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.java.io.IOException
- If an I/O error occurs while writing.void begin(java.io.OutputStream stream) throws java.io.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.java.io.IOException
- If an I/O error occurs while writing.void begin(java.io.Writer writer) throws java.io.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.java.io.IOException
- If an I/O error occurs while writing.void flush() throws java.io.IOException
java.io.IOException
- If an I/O error occurs during write.void end() throws java.io.IOException
begin(OutputStream)
or
begin(String)
.java.io.IOException