|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.IOHandler y.io.GMLIOHandler y.io.XGMLIOHandler
public class XGMLIOHandler
This class is closely related to GMLIOHandler, it produces structurally the same output as GMLIOHandler but uses well formed xml for the actual writing and reading. A very simple and thus highly extensible DTD is being used for this "gml over xml" format.
Note that this class can only be used with J2SE 1.4 or higher.
Constructor Summary | |
---|---|
XGMLIOHandler()
Creates a new instance of XGMLIOHandler |
Method Summary | |
---|---|
String |
getFileFormatString()
Returns the XGML file format string. |
String |
getFileNameExtension()
Returns the XGML file name extension, i.e. |
void |
read(Graph2D graph,
InputStream in)
Adds the contents from the given stream to the given graph. |
protected void |
read(Graph2D graph,
Reader reader)
Fills the contents of the given graph from a reader. |
void |
read(Graph2D graph,
String name)
Generates a FileReader and passes control
to GMLIOHandler.read(y.view.Graph2D, java.io.Reader) |
void |
write(Graph2D graph,
OutputStream out)
Writes the contents of the given graph in GML format to a stream. |
Methods inherited from class y.io.GMLIOHandler |
---|
convertColor, decodeColor, getEncoderFactory, getParserFactory, setEncoderFactory, setParserFactory |
Methods inherited from class y.io.IOHandler |
---|
canRead, canWrite, canWriteSubset, createObjectInputStream, createObjectOutputStream, hide, read, shouldSerialize, shouldSerialize, write, writeSubset, writeSubset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XGMLIOHandler()
Method Detail |
---|
public String getFileFormatString()
getFileFormatString
in class GMLIOHandler
public String getFileNameExtension()
getFileNameExtension
in class GMLIOHandler
public void write(Graph2D graph, OutputStream out) throws IOException
GMLIOHandler
ObjectEncoder.encode(Object, y.io.gml.GMLEncoder)
method
with the graph as the first argument.
write
in class GMLIOHandler
IOException
- in case of an I/O Exceptiongraph
- the graph to be writtenout
- The OutputStream being written to.protected void read(Graph2D graph, Reader reader) throws IOException
read
in class GMLIOHandler
IOException
- in case of an I/O Exceptiongraph
- the graph to be filledreader
- The reader being read frompublic void read(Graph2D graph, InputStream in) throws IOException
GMLIOHandler
read
in class GMLIOHandler
IOException
in
- The input stream being read frompublic void read(Graph2D graph, String name) throws IOException
GMLIOHandler
FileReader
and passes control
to GMLIOHandler.read(y.view.Graph2D, java.io.Reader)
read
in class GMLIOHandler
IOException
- in the case of an I/O errorgraph
- the graphname
- the filename
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |