Interface Filter

All Known Implementing Classes:
AbstractFilter, XPacketFilter

public interface Filter
Continuously filter bytes and produce an output that can be read back. Optionally pass processed bytes to a next filter.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    filter(byte[] buf, int off, int len)
    Filter a couple of bytes.
    boolean
    Return a flag indicating whether the contents processed by this filter represents a valid entity.
    void
    Reset the filter.
    void
    setAutoReset(boolean autoReset)
    Set the flag indicating whether the filter automatically resets its internal state when the end marker has been read.
  • Method Details

    • filter

      void filter(byte[] buf, int off, int len) throws IOException
      Filter a couple of bytes.
      Parameters:
      buf - buffer
      off - offset inside buffer
      len - number of bytes
      Throws:
      IOException
    • reset

      void reset()
      Reset the filter.
    • setAutoReset

      void setAutoReset(boolean autoReset)
      Set the flag indicating whether the filter automatically resets its internal state when the end marker has been read.
      Parameters:
      autoReset - autoReset
    • isValid

      boolean isValid()
      Return a flag indicating whether the contents processed by this filter represents a valid entity.
      Returns:
      true if the contents is valid; false otherwise.