Class ImageParser
java.lang.Object
org.apache.juneau.marshall.Context
org.apache.juneau.marshall.MarshallingContextable
org.apache.juneau.marshall.parser.Parser
org.apache.juneau.marshall.parser.InputStreamParser
org.apache.juneau.examples.parser.ImageParser
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.marshall.parser.InputStreamParser
InputStreamParser.Builder<SELF extends InputStreamParser.Builder<SELF>>, InputStreamParser.DefaultBuilderNested classes/interfaces inherited from class org.apache.juneau.marshall.parser.Parser
Parser.Null -
Field Summary
Fields inherited from class org.apache.juneau.marshall.parser.Parser
autoCloseStreams, consumes, debugOutputLines, listener, nulls, trimStrings, unbufferedFields inherited from class org.apache.juneau.marshall.MarshallingContextable
marshallingContextFields inherited from class org.apache.juneau.marshall.Context
CONTEXT_APPLY_FILTER -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with default settings (consumes image/png, image/jpeg and image/jpg). -
Method Summary
Modifier and TypeMethodDescription<T> TdoRead(ParserSession session, ParserPipe pipe, ClassMeta<T> type) Workhorse method.Methods inherited from class org.apache.juneau.marshall.parser.InputStreamParser
create, createSession, getBinaryFormat, getSession, isReaderParserMethods inherited from class org.apache.juneau.marshall.parser.Parser
canHandle, copy, createParserBuilder, getDebugOutputLines, getListener, getMediaTypes, getNulls, getPrimaryMediaType, isAutoCloseStreams, isTrimStrings, isUnbuffered, properties, read, read, read, read, read, read, readArgs, readIntoCollection, readIntoMap, readWithOuterMethods inherited from class org.apache.juneau.marshall.MarshallingContextable
getDurationFormat, getMarshallingContext, getPeriodFormatMethods inherited from class org.apache.juneau.marshall.Context
createBuilder, getAnnotationProvider, init, isDebug, toString
-
Constructor Details
-
ImageParser
public ImageParser()Constructor with default settings (consumes image/png, image/jpeg and image/jpg).
-
-
Method Details
-
doRead
public <T> T doRead(ParserSession session, ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException Workhorse method.Subclasses are expected to either implement this method or
ParserSession.doRead(ParserPipe, ClassMeta).- Overrides:
doReadin classParser- 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. Ifnull orObject., object type is based on what's being parsed. For example, when parsing JSON text, it may return aclass String ,Number ,JsonMap , etc...- Returns:
- The parsed object.
- Throws:
IOException- Thrown by underlying stream.ParseException- Malformed input encountered.
-