Class FrictionlessPackageDetector

java.lang.Object
org.apache.tika.detect.zip.FrictionlessPackageDetector
All Implemented Interfaces:
Serializable, ZipContainerDetector

public class FrictionlessPackageDetector extends Object implements ZipContainerDetector
See Also:
  • Constructor Details

    • FrictionlessPackageDetector

      public FrictionlessPackageDetector()
  • Method Details

    • detect

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

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

      public org.apache.tika.mime.MediaType streamingDetectFinal(StreamingDetectContext detectContext)
      Description copied from interface: ZipContainerDetector
      After we've finished streaming the zip archive entries, a detector may make a final decision.
      Specified by:
      streamingDetectFinal in interface ZipContainerDetector
      Returns: