Search this API

y.io.gml
Class XGMLTokenizer

java.lang.Object
  extended by y.io.gml.XGMLTokenizer

public class XGMLTokenizer
extends Object

This class is used to parse a valid stream from a reader, which contains well formed xgml. A callback method must be registered with this class, whose methods will be invoked during the parsing of the stream.

Note that this class can only be used with J2SE 1.4 or higher.


Constructor Summary
XGMLTokenizer()
          Creates a new instance of GMLTokenizer
XGMLTokenizer(GMLTokenizer.Callback callback)
          Creates a new instance of GMLTokenizer and installs the given callback
 
Method Summary
 GMLTokenizer.Callback getCallback()
          Getter for property callback.
 void parse(InputSource source)
          starts the parsing and will fire events to the registered callback
 void parse(Reader reader)
          Deprecated. This method does not handle encodings correctly, use parse(org.xml.sax.InputSource) instead.
 void setCallback(GMLTokenizer.Callback callback)
          Setter for property callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XGMLTokenizer

public XGMLTokenizer()
Creates a new instance of GMLTokenizer


XGMLTokenizer

public XGMLTokenizer(GMLTokenizer.Callback callback)
Creates a new instance of GMLTokenizer and installs the given callback

Parameters:
callback - the callback to be used
Method Detail

parse

public void parse(Reader reader)
           throws IOException
Deprecated. This method does not handle encodings correctly, use parse(org.xml.sax.InputSource) instead.

starts the parsing and will fire events to the registered callback

Throws:
IOException - in the case of an I/O Exception
Parameters:
reader - the stream to be parsed

parse

public void parse(InputSource source)
           throws IOException
starts the parsing and will fire events to the registered callback

Throws:
IOException - in the case of an I/O Exception
Parameters:
source - the input source to be parsed

getCallback

public GMLTokenizer.Callback getCallback()
Getter for property callback.

Returns:
Value of property callback.

setCallback

public void setCallback(GMLTokenizer.Callback callback)
Setter for property callback.

Parameters:
callback - New value of property callback.

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.