Class OPCPackageDetector
java.lang.Object
org.apache.tika.detect.microsoft.ooxml.OPCPackageDetector
- All Implemented Interfaces:
- Serializable,- ZipContainerDetector
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondetect(org.apache.commons.compress.archivers.zip.ZipFile zipFile, TikaInputStream stream) If detection is successful, the ZipDetector should set the zip file or OPCPackage in TikaInputStream.setOpenContainer() Implementations should _not_ close the ZipFilestatic MediaTypedetectOfficeOpenXML(org.apache.poi.openxml4j.opc.OPCPackage pkg) Detects the type of an OfficeOpenXML (OOXML) file from opened PackagestreamingDetectFinal(StreamingDetectContext detectContext) After we've finished streaming the zip archive entries, a detector may make a final decision.streamingDetectUpdate(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae, InputStream zis, StreamingDetectContext detectContext) Try to detect on a specific entry.
- 
Constructor Details- 
OPCPackageDetectorpublic OPCPackageDetector()
 
- 
- 
Method Details- 
detectOfficeOpenXMLDetects the type of an OfficeOpenXML (OOXML) file from opened Package
- 
parseOOXMLRels
- 
detectpublic MediaType detect(org.apache.commons.compress.archivers.zip.ZipFile zipFile, TikaInputStream stream) throws IOException Description copied from interface:ZipContainerDetectorIf detection is successful, the ZipDetector should set the zip file or OPCPackage in TikaInputStream.setOpenContainer() Implementations should _not_ close the ZipFile- Specified by:
- detectin interface- ZipContainerDetector
- Returns:
- Throws:
- IOException
 
- 
streamingDetectUpdatepublic MediaType streamingDetectUpdate(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae, InputStream zis, StreamingDetectContext detectContext) Description copied from interface:ZipContainerDetectorTry to detect on a specific entry. Detectors are allowed to store state (e.g. "remember what they've seen") in theStreamingDetectContext- Specified by:
- streamingDetectUpdatein interface- ZipContainerDetector
- Returns:
 
- 
streamingDetectFinalDescription copied from interface:ZipContainerDetectorAfter we've finished streaming the zip archive entries, a detector may make a final decision.- Specified by:
- streamingDetectFinalin interface- ZipContainerDetector
- Returns:
 
 
-