com.liferay.faces.util.xml.internal
Class XMLReaderImpl

java.lang.Object
  extended by com.liferay.faces.util.xml.internal.XMLReaderImpl
All Implemented Interfaces:
XMLReader

public class XMLReaderImpl
extends Object
implements XMLReader

This class is a thread-safe implementation of XMLReader. However, it does not fully implement all of the functionality of the one provided by the JRE.

Author:
Neil Griffin

Constructor Summary
XMLReaderImpl(Map<String,Boolean> featureMap)
           
 
Method Summary
 ContentHandler getContentHandler()
           
 DTDHandler getDTDHandler()
           
 EntityResolver getEntityResolver()
           
 ErrorHandler getErrorHandler()
           
 boolean getFeature(String name)
           
 Object getProperty(String name)
           
protected  Map<String,Object> getPropertyMap()
           
 void parse(InputSource inputSource)
           
protected  void parse(Reader reader)
          This method is a finite state machine that has the ability to parse the XML contents of the specified Reader and invoke callbacks on the registered ContentHandler.
 void parse(String systemId)
           
 void setContentHandler(ContentHandler contentHandler)
           
 void setDTDHandler(DTDHandler dtdHandler)
           
 void setEntityResolver(EntityResolver entityResolver)
           
 void setErrorHandler(ErrorHandler errorHandler)
           
 void setFeature(String name, boolean value)
           
 void setProperty(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLReaderImpl

public XMLReaderImpl(Map<String,Boolean> featureMap)
Method Detail

parse

public void parse(InputSource inputSource)
           throws IOException,
                  SAXException
Specified by:
parse in interface XMLReader
Throws:
IOException
SAXException

parse

public void parse(String systemId)
           throws IOException,
                  SAXException
Specified by:
parse in interface XMLReader
Throws:
IOException
SAXException

parse

protected void parse(Reader reader)
              throws IOException,
                     SAXException
This method is a finite state machine that has the ability to parse the XML contents of the specified Reader and invoke callbacks on the registered ContentHandler.

Parameters:
reader - The reader that contains the XML markup.
Throws:
IOException - If an error occurs during the read process.
SAXException - If an error occurs in one of the ContentHandler callbacks.

getContentHandler

public ContentHandler getContentHandler()
Specified by:
getContentHandler in interface XMLReader

setContentHandler

public void setContentHandler(ContentHandler contentHandler)
Specified by:
setContentHandler in interface XMLReader

getDTDHandler

public DTDHandler getDTDHandler()
Specified by:
getDTDHandler in interface XMLReader

setDTDHandler

public void setDTDHandler(DTDHandler dtdHandler)
Specified by:
setDTDHandler in interface XMLReader

getEntityResolver

public EntityResolver getEntityResolver()
Specified by:
getEntityResolver in interface XMLReader

setEntityResolver

public void setEntityResolver(EntityResolver entityResolver)
Specified by:
setEntityResolver in interface XMLReader

getErrorHandler

public ErrorHandler getErrorHandler()
Specified by:
getErrorHandler in interface XMLReader

setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)
Specified by:
setErrorHandler in interface XMLReader

getFeature

public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
getFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setFeature

public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
Specified by:
setFeature in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

getProperty

public Object getProperty(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
getProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setProperty

public void setProperty(String name,
                        Object value)
                 throws SAXNotRecognizedException,
                        SAXNotSupportedException
Specified by:
setProperty in interface XMLReader
Throws:
SAXNotRecognizedException
SAXNotSupportedException

getPropertyMap

protected Map<String,Object> getPropertyMap()


Copyright © 2015 Liferay, Inc.. All rights reserved.