Package org.apache.tika.parser
Class AutoDetectParserConfig
- java.lang.Object
-
- org.apache.tika.config.ConfigBase
-
- org.apache.tika.parser.AutoDetectParserConfig
-
- All Implemented Interfaces:
Serializable
public class AutoDetectParserConfig extends ConfigBase implements Serializable
This config object can be used to tune how conservative we want to be when parsing data that is extremely compressible and resembles a ZIP bomb. Null values will be ignored and will not affect the default values in SecureContentHandler.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AutoDetectParserConfig
DEFAULT
-
Constructor Summary
Constructors Constructor Description AutoDetectParserConfig()
AutoDetectParserConfig(Long spoolToDisk, Long outputThreshold, Long maximumCompressionRatio, Integer maximumDepth, Integer maximumPackageEntryDepth)
Creates a SecureContentHandlerConfig using the passed in parameters.
-
Method Summary
-
Methods inherited from class org.apache.tika.config.ConfigBase
buildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettings
-
-
-
-
Field Detail
-
DEFAULT
public static AutoDetectParserConfig DEFAULT
-
-
Constructor Detail
-
AutoDetectParserConfig
public AutoDetectParserConfig(Long spoolToDisk, Long outputThreshold, Long maximumCompressionRatio, Integer maximumDepth, Integer maximumPackageEntryDepth)
Creates a SecureContentHandlerConfig using the passed in parameters.- Parameters:
spoolToDisk
-outputThreshold
- SecureContentHandler - character output threshold.maximumCompressionRatio
- SecureContentHandler - max compression ratio allowed.maximumDepth
- SecureContentHandler - maximum XML element nesting level.maximumPackageEntryDepth
- SecureContentHandler - maximum package entry nesting level.
-
AutoDetectParserConfig
public AutoDetectParserConfig()
-
-
Method Detail
-
load
public static AutoDetectParserConfig load(Element element) throws TikaConfigException, IOException
- Throws:
TikaConfigException
IOException
-
getSpoolToDisk
public Long getSpoolToDisk()
-
setSpoolToDisk
public void setSpoolToDisk(long spoolToDisk)
-
getOutputThreshold
public Long getOutputThreshold()
-
setOutputThreshold
public void setOutputThreshold(long outputThreshold)
-
getMaximumCompressionRatio
public Long getMaximumCompressionRatio()
-
setMaximumCompressionRatio
public void setMaximumCompressionRatio(long maximumCompressionRatio)
-
getMaximumDepth
public Integer getMaximumDepth()
-
setMaximumDepth
public void setMaximumDepth(int maximumDepth)
-
getMaximumPackageEntryDepth
public Integer getMaximumPackageEntryDepth()
-
setMaximumPackageEntryDepth
public void setMaximumPackageEntryDepth(int maximumPackageEntryDepth)
-
getMetadataWriteFilterFactory
public MetadataWriteFilterFactory getMetadataWriteFilterFactory()
-
setMetadataWriteFilterFactory
public void setMetadataWriteFilterFactory(MetadataWriteFilterFactory metadataWriteFilterFactory)
-
setEmbeddedDocumentExtractorFactory
public void setEmbeddedDocumentExtractorFactory(EmbeddedDocumentExtractorFactory embeddedDocumentExtractorFactory)
-
getEmbeddedDocumentExtractorFactory
public EmbeddedDocumentExtractorFactory getEmbeddedDocumentExtractorFactory()
-
setContentHandlerDecoratorFactory
public void setContentHandlerDecoratorFactory(ContentHandlerDecoratorFactory contentHandlerDecoratorFactory)
-
getContentHandlerDecoratorFactory
public ContentHandlerDecoratorFactory getContentHandlerDecoratorFactory()
-
setDigesterFactory
public void setDigesterFactory(DigestingParser.DigesterFactory digesterFactory)
-
getDigesterFactory
public DigestingParser.DigesterFactory getDigesterFactory()
-
-