org.graffiti.plugin.io
Class AbstractInputSerializer

java.lang.Object
  extended by org.graffiti.plugin.AbstractParametrizable
      extended by org.graffiti.plugin.io.AbstractInputSerializer
All Implemented Interfaces:
InputSerializer, Serializer, Parametrizable

public abstract class AbstractInputSerializer
extends AbstractParametrizable
implements InputSerializer

Provides additional methods to access a graph file from different kinds of input.

Version:
$Revision: 5767 $

Constructor Summary
AbstractInputSerializer()
           
 
Method Summary
 Graph read(InputStream in)
          Reads in a graph from the given input stream.
abstract  void read(InputStream in, Graph g)
          Reads in a graph from the given input stream.
 void read(String filename, Graph g)
          Reads in a graph from the given filename.
 void read(URL url, Graph g)
          Reads in the graph from the given url.
 
Methods inherited from class org.graffiti.plugin.AbstractParametrizable
copyParameters, getDefaultParameters, getParameters, getUserParameters, saveUserParameters, saveUserParameters, setParameters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graffiti.plugin.io.Serializer
getExtensions
 
Methods inherited from interface org.graffiti.plugin.Parametrizable
getDefaultParameters, getName, getParameters, setParameters
 

Constructor Detail

AbstractInputSerializer

public AbstractInputSerializer()
Method Detail

read

public void read(String filename,
                 Graph g)
          throws IOException
Reads in a graph from the given filename.

Specified by:
read in interface InputSerializer
Parameters:
filename - The name of the file to read the graph from.
g - The graph to add the newly read graph to.
Throws:
IOException - If an IO error occurs.

read

public void read(URL url,
                 Graph g)
          throws IOException
Reads in the graph from the given url.

Specified by:
read in interface InputSerializer
Parameters:
url - The URL to read the graph from.
g - The graph to add the newly read graph to.
Throws:
IOException - If an IO error occurs.

read

public abstract void read(InputStream in,
                          Graph g)
                   throws IOException
Reads in a graph from the given input stream.

Specified by:
read in interface InputSerializer
Parameters:
in - The input stream to read the graph from.
g - The graph to add the newly read graph to.
Throws:
IOException - If an IO error occurs.

read

public Graph read(InputStream in)
           throws IOException
Reads in a graph from the given input stream.

Specified by:
read in interface InputSerializer
Parameters:
in - The input stream to read the graph from.
Returns:
The newly read graph.
Throws:
IOException - If an IO error occurs.


Generated at 2012-05-30 11:00:14 PM CEST