Interface ZipContainerDetector

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.tika.mime.MediaType detect​(org.apache.commons.compress.archivers.zip.ZipFile zipFile, org.apache.tika.io.TikaInputStream tis)
      If detection is successful, the ZipDetector should set the zip file or OPCPackage in TikaInputStream.setOpenContainer() Implementations should _not_ close the ZipFile
      org.apache.tika.mime.MediaType streamingDetectFinal​(StreamingDetectContext detectContext)
      After we've finished streaming the zip archive entries, a detector may make a final decision.
      org.apache.tika.mime.MediaType streamingDetectUpdate​(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae, InputStream zis, StreamingDetectContext detectContext)
      Try to detect on a specific entry.
    • Method Detail

      • detect

        org.apache.tika.mime.MediaType detect​(org.apache.commons.compress.archivers.zip.ZipFile zipFile,
                                              org.apache.tika.io.TikaInputStream tis)
                                       throws IOException
        If detection is successful, the ZipDetector should set the zip file or OPCPackage in TikaInputStream.setOpenContainer() Implementations should _not_ close the ZipFile
        Parameters:
        zipFile -
        tis -
        Returns:
        Throws:
        IOException
      • streamingDetectUpdate

        org.apache.tika.mime.MediaType streamingDetectUpdate​(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zae,
                                                             InputStream zis,
                                                             StreamingDetectContext detectContext)
                                                      throws IOException
        Try to detect on a specific entry. Detectors are allowed to store state (e.g. "remember what they've seen") in the StreamingDetectContext
        Parameters:
        zae -
        Returns:
        Throws:
        IOException
      • streamingDetectFinal

        org.apache.tika.mime.MediaType streamingDetectFinal​(StreamingDetectContext detectContext)
        After we've finished streaming the zip archive entries, a detector may make a final decision.
        Returns: