Class StreamingDetectContext

java.lang.Object
org.apache.tika.detect.zip.StreamingDetectContext

public class StreamingDetectContext extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    get(Class<T> key)
    Returns the object in this context that implements the given interface.
    <T> T
    get(Class<T> key, T defaultValue)
    Returns the object in this context that implements the given interface, or the given default value if such an object is not found.
    void
     
    <T> void
    set(Class<T> key, T value)
    Adds the given value to the context as an implementation of the given interface.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StreamingDetectContext

      public StreamingDetectContext()
  • Method Details

    • set

      public <T> void set(Class<T> key, T value)
      Adds the given value to the context as an implementation of the given interface.
      Parameters:
      key - the interface implemented by the given value
      value - the value to be added, or null to remove
    • get

      public <T> T get(Class<T> key)
      Returns the object in this context that implements the given interface.
      Parameters:
      key - the interface implemented by the requested object
      Returns:
      the object that implements the given interface, or null if not found
    • get

      public <T> T get(Class<T> key, T defaultValue)
      Returns the object in this context that implements the given interface, or the given default value if such an object is not found.
      Parameters:
      key - the interface implemented by the requested object
      defaultValue - value to return if the requested object is not found
      Returns:
      the object that implements the given interface, or the given default value if not found
    • remove

      public void remove(Class key)