public class PrudentHttpEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver
Constructor and Description |
---|
PrudentHttpEntityResolver(long sizeLimit,
boolean laxContentType,
org.xml.sax.ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAcceptAllKnownXmlTypes()
Returns the acceptAllKnownXmlTypes.
|
boolean |
isAllowGenericXml()
Returns the allowGenericXml.
|
boolean |
isAllowHtml()
Returns the allowHtml.
|
boolean |
isAllowRnc() |
boolean |
isAllowXhtml()
Returns the allowXhtml.
|
boolean |
isOnlyHtmlAllowed() |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId) |
void |
setAcceptAllKnownXmlTypes(boolean acceptAllKnownXmlTypes)
Sets the acceptAllKnownXmlTypes.
|
void |
setAllowGenericXml(boolean allowGenericXml)
Sets the allowGenericXml.
|
void |
setAllowHtml(boolean allowHtml) |
void |
setAllowRnc(boolean allowRnc) |
void |
setAllowXhtml(boolean allowXhtml)
Sets the allowXhtml.
|
static void |
setParams(int connectionTimeout,
int socketTimeout,
int maxRequests)
Sets the timeouts of the HTTP client.
|
void |
setUserAgent(java.lang.String ua) |
public PrudentHttpEntityResolver(long sizeLimit, boolean laxContentType, org.xml.sax.ErrorHandler errorHandler)
sizeLimit
- laxContentType
- errorHandler
- public static void setParams(int connectionTimeout, int socketTimeout, int maxRequests)
connectionTimeout
- timeout until connection established in milliseconds. Zero
means no timeout.socketTimeout
- timeout for waiting for data in milliseconds. Zero means no
timeout.maxRequests
- maximum number of connections to a particuar hostpublic void setUserAgent(java.lang.String ua)
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
resolveEntity
in interface org.xml.sax.EntityResolver
org.xml.sax.SAXException
java.io.IOException
EntityResolver.resolveEntity(java.lang.String,
java.lang.String)
public boolean isAllowRnc()
public void setAllowRnc(boolean allowRnc)
allowRnc
- The allowRnc to set.public void setAllowHtml(boolean allowHtml)
allowHtml
- public boolean isAcceptAllKnownXmlTypes()
public void setAcceptAllKnownXmlTypes(boolean acceptAllKnownXmlTypes)
acceptAllKnownXmlTypes
- the acceptAllKnownXmlTypes to setpublic boolean isAllowGenericXml()
public void setAllowGenericXml(boolean allowGenericXml)
allowGenericXml
- the allowGenericXml to setpublic boolean isAllowXhtml()
public void setAllowXhtml(boolean allowXhtml)
allowXhtml
- the allowXhtml to setpublic boolean isAllowHtml()
public boolean isOnlyHtmlAllowed()