public class BasicContentHandlerFactory extends Object implements ContentHandlerFactory
Modifier and Type | Class and Description |
---|---|
static class |
BasicContentHandlerFactory.HANDLER_TYPE
Common handler types for content.
|
Constructor and Description |
---|
BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE type,
int writeLimit) |
Modifier and Type | Method and Description |
---|---|
ContentHandler |
getNewContentHandler() |
ContentHandler |
getNewContentHandler(OutputStream os,
String encoding) |
BasicContentHandlerFactory.HANDLER_TYPE |
getType() |
static BasicContentHandlerFactory.HANDLER_TYPE |
parseHandlerType(String handlerTypeName,
BasicContentHandlerFactory.HANDLER_TYPE defaultType)
Tries to parse string into handler type.
|
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(String handlerTypeName, BasicContentHandlerFactory.HANDLER_TYPE defaultType)
handlerTypeName
- string to parsedefaultType
- type to return if parse failspublic ContentHandler getNewContentHandler()
getNewContentHandler
in interface ContentHandlerFactory
public ContentHandler getNewContentHandler(OutputStream os, String encoding) throws UnsupportedEncodingException
getNewContentHandler
in interface ContentHandlerFactory
UnsupportedEncodingException
public BasicContentHandlerFactory.HANDLER_TYPE getType()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.