com.ibm.portal.spa.parser
Interface ThemeParser

All Superinterfaces:
Disposable, ThemeFilter

public interface ThemeParser
extends ThemeFilter

Interface to the static page parser. The parser is NOT threadsafe but may be used to parse multiple documents sequentially. The parser will parse an InputStream of the matching mime-type and throws parsing events onto the attached ThemeContentHandler. Make sure to call Disposable.dispose() when the parser is no longer used

Since:
7.0

Method Summary
 java.lang.String getContentType()
          Returns the mime-type string that this parser matches
 void parse(java.io.InputStream in)
          Actually parse an input stream, the content of the input stream must match the mime-type of the parser.
 ErrorHandler setErrorHandler(ErrorHandler aHandler)
          Replaces the handler that decides how exceptions are processed
 
Methods inherited from interface com.ibm.portal.spa.parser.ThemeFilter
getThemeContentHandler, setThemeContentHandler
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 

Method Detail

setErrorHandler

ErrorHandler setErrorHandler(ErrorHandler aHandler)
Replaces the handler that decides how exceptions are processed

Parameters:
aHandler - the error handler
Returns:
the old handler

getContentType

java.lang.String getContentType()
Returns the mime-type string that this parser matches

Returns:
mime type string, not null

parse

void parse(java.io.InputStream in)
           throws java.io.IOException
Actually parse an input stream, the content of the input stream must match the mime-type of the parser.

Parameters:
in - input stream of the document to be parsed
Throws:
java.io.IOException