public class OPCPackageDetector extends Object implements ZipContainerDetector
| Constructor and Description | 
|---|
OPCPackageDetector()  | 
| Modifier and Type | Method and Description | 
|---|---|
MediaType | 
detect(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() 
 | 
static MediaType | 
detectOfficeOpenXML(org.apache.poi.openxml4j.opc.OPCPackage pkg)
Detects the type of an OfficeOpenXML (OOXML) file from
 opened Package 
 | 
static Set<String> | 
parseOOXMLRels(InputStream is)  | 
MediaType | 
streamingDetectFinal(StreamingDetectContext detectContext)
After we've finished streaming the zip archive entries,
 a detector may make a final decision. 
 | 
MediaType | 
streamingDetectUpdate(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae,
                     InputStream zis,
                     StreamingDetectContext detectContext)
Try to detect on a specific entry. 
 | 
public static MediaType detectOfficeOpenXML(org.apache.poi.openxml4j.opc.OPCPackage pkg)
public static Set<String> parseOOXMLRels(InputStream is)
public MediaType detect(org.apache.commons.compress.archivers.zip.ZipFile zipFile, TikaInputStream stream) throws IOException
ZipContainerDetectordetect in interface ZipContainerDetectorIOExceptionpublic MediaType streamingDetectUpdate(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae, InputStream zis, StreamingDetectContext detectContext)
ZipContainerDetectorStreamingDetectContextstreamingDetectUpdate in interface ZipContainerDetectorpublic MediaType streamingDetectFinal(StreamingDetectContext detectContext)
ZipContainerDetectorstreamingDetectFinal in interface ZipContainerDetectorCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.