Class 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 ModifyingContentWithHandlersAndMetadataFilters for documentation and examples for configuring this with a tika-config.xml file.

    See Also:
    Serialized Form
    • 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

      • 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)
      • setMetadataWriteFilterFactory

        public void setMetadataWriteFilterFactory​(MetadataWriteFilterFactory metadataWriteFilterFactory)
      • setContentHandlerDecoratorFactory

        public void setContentHandlerDecoratorFactory​(ContentHandlerDecoratorFactory contentHandlerDecoratorFactory)
      • setThrowOnZeroBytes

        public void setThrowOnZeroBytes​(boolean throwOnZeroBytes)
      • getThrowOnZeroBytes

        public boolean getThrowOnZeroBytes()