Class XapThumbnailsProcessor

java.lang.Object
com.day.cq.dam.commons.thumbnail.XapThumbnailsProcessor
All Implemented Interfaces:
Processor, FilterStateListener

public class XapThumbnailsProcessor extends Object implements Processor, FilterStateListener
Process bytes, extract thumbnails found in <xap:Thumbnails> tags and add them to a Context.
  • Constructor Details

    • XapThumbnailsProcessor

      public XapThumbnailsProcessor(Context context)
      Create a new instance of this class.
      Parameters:
      context - context
  • Method Details

    • process

      public final void process(byte[] buf, int off, int len) throws IOException
      Process a couple of bytes.
      Specified by:
      process in interface Processor
      Parameters:
      buf - buffer
      off - offset inside buffer
      len - number of bytes
      Throws:
      IOException - thrown in event of failure to process the bytes
    • started

      public OutputStream started(Filter filter)
      Invoked when the filter detects the start of a section it understands.
      Specified by:
      started in interface FilterStateListener
      Parameters:
      filter - filter
      Returns:
      output stream, if the listener wants to have the consecutive bytes automatically written to some location or null
    • ended

      public void ended(Filter filter, OutputStream out)
      Invoked when the filter detects the end of a section.
      Specified by:
      ended in interface FilterStateListener
      Parameters:
      filter - filter
      out - output stream returned from FilterStateListener.started(Filter) or null