Class InputStreamParser
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
- Direct Known Subclasses:
BsonParser,CborParser,ImageParser,MsgPackParser,ParquetParser,PetPhotoParser,RdfStreamParser
Subclass of
Parser for byte-based parsers.
Description
This class is typically the parent class of all byte-based parsers. It has 1 abstract method to implement on the session object...
Notes:
- This class is thread safe and reusable.
See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class.static final classConcrete default builder leaf for the non-subclassedcreate()/Parser.copy()path.Nested 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
ConstructorsModifierConstructorDescriptionprotectedInputStreamParser(InputStreamParser.Builder<?> builder) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamParser.Builder<?>create()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.Methods inherited from class org.apache.juneau.marshall.parser.Parser
canHandle, copy, createParserBuilder, doRead, 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
-
InputStreamParser
Constructor.- Parameters:
builder- The builder for this object.
Cannot benull .
-
-
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.Resolves from the configured
MarshallingContext.getBinaryFormat().- Returns:
- The binary wire format used by this parser.
-