Package org.apache.tika.detect.zip
Class StreamingZipContainerDetector
java.lang.Object
org.apache.tika.detect.zip.DefaultZipContainerDetector
org.apache.tika.detect.zip.StreamingZipContainerDetector
- All Implemented Interfaces:
Serializable,org.apache.tika.config.SelfConfiguring,org.apache.tika.detect.Detector
A zip container detector that uses only streaming detection, never opening
the file as a ZipFile. This is primarily used in tests to verify streaming
detection behavior.
Unlike DefaultZipContainerDetector, this will never try to open
the File as a ZipFile; this relies solely on streaming detection.
If you need to limit the amount of data read during detection, wrap your
input stream in a BoundedInputStream before
passing it to the detector.
- See Also:
-
Field Summary
Fields inherited from class org.apache.tika.detect.zip.DefaultZipContainerDetector
staticZipDetectors -
Constructor Summary
ConstructorsConstructorDescriptionStreamingZipContainerDetector(List<ZipContainerDetector> zipDetectors) StreamingZipContainerDetector(org.apache.tika.config.ServiceLoader loader) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.tika.mime.MediaTypedetect(org.apache.tika.io.TikaInputStream tis, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext)
-
Constructor Details
-
StreamingZipContainerDetector
public StreamingZipContainerDetector() -
StreamingZipContainerDetector
public StreamingZipContainerDetector(org.apache.tika.config.ServiceLoader loader) -
StreamingZipContainerDetector
-
-
Method Details
-
detect
public org.apache.tika.mime.MediaType detect(org.apache.tika.io.TikaInputStream tis, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext parseContext) throws IOException - Specified by:
detectin interfaceorg.apache.tika.detect.Detector- Overrides:
detectin classDefaultZipContainerDetector- Throws:
IOException
-