public class BasicContentHandlerFactory extends java.lang.Object implements ContentHandlerFactory
Modifier and Type | Class and Description |
---|---|
static class |
BasicContentHandlerFactory.HANDLER_TYPE
Common handler types for content.
|
Modifier and Type | Field and Description |
---|---|
private BasicContentHandlerFactory.HANDLER_TYPE |
type |
private int |
writeLimit |
Constructor and Description |
---|
BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE type,
int writeLimit) |
Modifier and Type | Method and Description |
---|---|
org.xml.sax.ContentHandler |
getNewContentHandler() |
org.xml.sax.ContentHandler |
getNewContentHandler(java.io.OutputStream os,
java.lang.String encoding) |
static BasicContentHandlerFactory.HANDLER_TYPE |
parseHandlerType(java.lang.String handlerTypeName,
BasicContentHandlerFactory.HANDLER_TYPE defaultType)
Tries to parse string into handler type.
|
private final BasicContentHandlerFactory.HANDLER_TYPE type
private final int writeLimit
public BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE type, int writeLimit)
type
- basic type of handlerwriteLimit
- max number of characters to store; if < 0, the handler will store all characterspublic static BasicContentHandlerFactory.HANDLER_TYPE parseHandlerType(java.lang.String handlerTypeName, BasicContentHandlerFactory.HANDLER_TYPE defaultType)
handlerTypeName
- string to parsedefaultType
- type to return if parse failspublic org.xml.sax.ContentHandler getNewContentHandler()
getNewContentHandler
in interface ContentHandlerFactory
public org.xml.sax.ContentHandler getNewContentHandler(java.io.OutputStream os, java.lang.String encoding) throws java.io.UnsupportedEncodingException
getNewContentHandler
in interface ContentHandlerFactory
java.io.UnsupportedEncodingException