Package org.apache.juneau.parser
Class InputStreamParser
java.lang.Object
org.apache.juneau.Context
org.apache.juneau.BeanContextable
org.apache.juneau.parser.Parser
org.apache.juneau.parser.InputStreamParser
- Direct Known Subclasses:
ImageParser,MsgPackParser
Subclass of
Parser for byte-based parsers.
Description
This class is typically the parent class of all character-based parsers. It has 1 abstract method to implement on the session object...
parse(ParserSession, ClassMeta)
Notes:
- This class is thread safe and reusable.
See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.juneau.parser.Parser
Parser.Null -
Field Summary
FieldsFields inherited from class org.apache.juneau.parser.Parser
autoCloseStreams, consumes, debugOutputLines, listener, strict, trimStrings, unbufferedFields inherited from class org.apache.juneau.BeanContextable
beanContextFields inherited from class org.apache.juneau.Context
CONTEXT_APPLY_FILTER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamParser.Buildercreate()Creates a new builder for this object.Create a session builder based on the properties defined on this context.protected final BinaryFormatBinary input format.Returns a session to use for this context.final booleanReturnstrue if this parser subclasses fromReaderParser.Returns the properties on this bean as a map for debugging.Methods inherited from class org.apache.juneau.parser.Parser
canHandle, copy, createParserBuilder, doParse, getDebugOutputLines, getListener, getMediaTypes, getPrimaryMediaType, isAutoCloseStreams, isStrict, isTrimStrings, isUnbuffered, parse, parse, parse, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMapMethods inherited from class org.apache.juneau.BeanContextable
getBeanContextMethods inherited from class org.apache.juneau.Context
createBuilder, getAnnotationProvider, init, isDebug, toString
-
Field Details
-
binaryFormat
-
-
Constructor Details
-
InputStreamParser
Constructor.- Parameters:
builder- The builder for this object.
-
-
Method Details
-
create
Creates a new builder for this object.- Returns:
- A new builder.
-
createSession
Description copied from class:ContextCreate a session builder based on the properties defined on this context.Use this method for creating sessions where you want to override basic settings. Otherwise, use
Context.getSession()directly.- Overrides:
createSessionin classParser- Returns:
- A new session builder.
-
getSession
Description copied from class:ContextReturns a session to use for this context.Note that subclasses may opt to return a reusable non-modifiable session.
- Overrides:
getSessionin classParser- Returns:
- A new session object.
-
isReaderParser
Description copied from class:ParserReturnstrue if this parser subclasses fromReaderParser.- Overrides:
isReaderParserin classParser- Returns:
true if this parser subclasses fromReaderParser.
-
getBinaryFormat
Binary input format.- Returns:
- The format to use when converting strings to byte arrays.
- See Also:
-
properties
Description copied from class:ContextReturns the properties on this bean as a map for debugging.- Overrides:
propertiesin classParser- Returns:
- The properties on this bean as a map for debugging.
-