Class ImageParser

All Implemented Interfaces:
AnnotationProvider

public class ImageParser extends InputStreamParser
Example parser that converts byte streams to BufferedImage objects.
See Also:
  • Constructor Details

  • Method Details

    • doParse

      public <T> T doParse(ParserSession session, ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException
      Description copied from class: Parser
      Workhorse method.

      Subclasses are expected to either implement this method or ParserSession.doParse(ParserPipe, ClassMeta).

      Overrides:
      doParse in class Parser
      Type Parameters:
      T - The class type of the object to create.
      Parameters:
      session - The current session.
      pipe - Where to get the input from.
      type - The class type of the object to create. If null or Object.class, object type is based on what's being parsed. For example, when parsing JSON text, it may return a String, Number, JsonMap, etc...
      Returns:
      The parsed object.
      Throws:
      IOException - Thrown by underlying stream.
      ParseException - Malformed input encountered.