Class XMPProcessor

    • Constructor Summary

      Constructors 
      Constructor Description
      XMPProcessor​(Context context)
      Create a new instance of this class.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void ended​(Filter filter, java.io.OutputStream out)
      Invoked when the filter detects the end of a section.
      void process​(byte[] buf, int off, int len)
      Process a couple of bytes.
      static java.io.InputStream process​(java.io.InputStream in)
      Utility method that processes an input stream and returns the first valid XMP input stream.
      java.io.OutputStream started​(Filter filter)
      Invoked when the filter detects the start of a section it understands.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMPProcessor

        public XMPProcessor​(Context context)
        Create a new instance of this class.
        Parameters:
        context - context
    • Method Detail

      • process

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

        public java.io.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
      • process

        public static java.io.InputStream process​(java.io.InputStream in)
                                           throws java.io.IOException,
                                                  ProcessorException
        Utility method that processes an input stream and returns the first valid XMP input stream.
        Parameters:
        in - input stream
        Throws:
        java.io.IOException - if an I/O error occurs
        ProcessorException - if a processor error occurs