de.trantor.wap
Class SaxWrapper

java.lang.Object
  |
  +--de.trantor.wap.SaxWrapper

public class SaxWrapper
extends java.lang.Object
implements org.xml.sax.Parser

An implementation of the org.xml.parser interface that can be wrapped around a WbxmlParser or WmlParser.


Constructor Summary
SaxWrapper(WbxmlParser wrapped)
          The wrapper needs a simple WbxmlParser (or WmlParser) to build on.
 
Method Summary
 void parse(org.xml.sax.InputSource is)
          Parse an XML document by invoking the parse method of the wrapped WbxmlParser.
 void parse(java.lang.String systemId)
          Shortcut for parse(new InputSource(systemId));
 void setDocumentHandler(org.xml.sax.DocumentHandler h)
          passes the DocumentHandler to the wrapped WbxmlParser given in the constructor
 void setDTDHandler(org.xml.sax.DTDHandler ignored)
          This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
 void setEntityResolver(org.xml.sax.EntityResolver ignored)
          This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
 void setErrorHandler(org.xml.sax.ErrorHandler ignored)
          This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
 void setLocale(java.util.Locale ignored)
          This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxWrapper

public SaxWrapper(WbxmlParser wrapped)
The wrapper needs a simple WbxmlParser (or WmlParser) to build on. All method invocations are handed over to the wrapped WbxmlParser.
Method Detail

parse

public void parse(org.xml.sax.InputSource is)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parse an XML document by invoking the parse method of the wrapped WbxmlParser.
Specified by:
parse in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
source - The input source for the top-level of the XML document.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
java.io.IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
See Also:
InputSource, Parser.parse(java.lang.String), Parser.setEntityResolver(org.xml.sax.EntityResolver), Parser.setDTDHandler(org.xml.sax.DTDHandler), Parser.setDocumentHandler(org.xml.sax.DocumentHandler), Parser.setErrorHandler(org.xml.sax.ErrorHandler)

parse

public void parse(java.lang.String systemId)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Shortcut for parse(new InputSource(systemId));
Specified by:
parse in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
systemId - The system identifier (URI).
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
java.io.IOException - An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.
See Also:
Parser.parse(org.xml.sax.InputSource)

setDocumentHandler

public void setDocumentHandler(org.xml.sax.DocumentHandler h)
passes the DocumentHandler to the wrapped WbxmlParser given in the constructor
Specified by:
setDocumentHandler in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
handler - The document handler.
See Also:
DocumentHandler, HandlerBase

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler ignored)
This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
Specified by:
setDTDHandler in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
handler - The DTD handler.
See Also:
DTDHandler, HandlerBase

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver ignored)
This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
Specified by:
setEntityResolver in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
resolver - The object for resolving entities.
See Also:
EntityResolver, HandlerBase

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler ignored)
This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
Specified by:
setErrorHandler in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
handler - The error handler.
See Also:
ErrorHandler, SAXException, HandlerBase

setLocale

public void setLocale(java.util.Locale ignored)
This method is included for compatibility and does nothing since the corresponding functionality is not supported by WBXML
Specified by:
setLocale in interface org.xml.sax.Parser
Tags copied from interface: org.xml.sax.Parser
Parameters:
locale - A Java Locale object.
Throws:
org.xml.sax.SAXException - Throws an exception (using the previous or default locale) if the requested locale is not supported.
See Also:
SAXException, SAXParseException