Class InputStreamParserSession
java.lang.Object
org.apache.juneau.marshall.ContextSession
org.apache.juneau.marshall.MarshallingSession
org.apache.juneau.marshall.parser.ParserSession
org.apache.juneau.marshall.parser.InputStreamParserSession
- All Implemented Interfaces:
BeanSession,ConverterSession
- Direct Known Subclasses:
BsonParserSession,CborParserSession,MsgPackParserSession,ParquetParserSession,RdfStreamParserSession
Subclass of parser session objects for byte-based parsers.
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class.static final classConcrete default builder leaf for the non-subclassedcreate()path (CRTP terminal). -
Field Summary
Fields inherited from class org.apache.juneau.marshall.parser.ParserSession
DEFAULT_MAX_PARSE_DEPTHFields inherited from class org.apache.juneau.marshall.MarshallingSession
NAME_PROPERTY_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamParserSession.Builder<?>create(InputStreamParser ctx) Creates a new builder for this object.final ParserPipecreatePipe(Object input) Wraps the specified input object into aParserPipeobject so that it can be easily converted into a stream or reader.protected final BinaryFormatBinary input format.booleanReturns whether this binary parser has a native byte-array wire type.final booleanReturnstrue if this parser subclasses fromReaderParser.Methods inherited from class org.apache.juneau.marshall.parser.ParserSession
allocateLocal, cast, checkRequired, convertAttrToType, create, doRead, doReadIntoCollection, doReadIntoMap, doReadToBeanConsumer, enterParseDepth, exitParseDepth, getCalendarFormat, getClassMeta, getDateFormat, getDebugOutputLines, getDurationFormat, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getLocaleFormat, getNulls, getOuter, getPeriodFormat, getPosition, getSchema, getStringBuilder, getTemporalFormat, getTimeZoneFormat, isAutoCloseStreams, isTrimStrings, isUnbuffered, mark, onBeanSetterException, onUnknownProperty, parentBean, properties, read, read, read, read, read, read, readArgs, readCalendar, readDate, readDuration, readIntoCollection, readIntoMap, readPeriod, readTemporal, readToBeanConsumer, returnStringBuilder, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, swapParentBean, trim, trim, unmark, unswapMethods inherited from class org.apache.juneau.marshall.MarshallingSession
addWarning, convertToMemberType, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, convertToType, create, get, getActiveView, getAnnotationProvider, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassLoader, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMarshallingContext, getMediaType, getNotBeanClasses, getNotBeanPackagesNames, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isPropertyInActiveView, isRecordComponentOrder, isUnsortedProperties, isUseInterfaceProxies, isUseJavaBeanIntrospector, isValidateSchema, newBean, newBean, newBeanMap, newBeanMap, newGenericList, newGenericMap, newGenericMap, object, parseToList, parseToMap, string, toArray, toBeanMap, toBeanMap, toBeanMapMethods inherited from class org.apache.juneau.marshall.ContextSession
checkForWarnings, getContext, getSessionProperties, getWarnings, isDebug, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.commons.conversion.ConverterSession
get
-
Constructor Details
-
InputStreamParserSession
Constructor.- Parameters:
builder- The builder for this object.
Cannot benull .
-
-
Method Details
-
create
Creates a new builder for this object.- Parameters:
ctx- The context creating this session.
Cannot benull .- Returns:
- A new builder.
-
createPipe
Wraps the specified input object into aParserPipeobject so that it can be easily converted into a stream or reader.- Overrides:
createPipein classParserSession- Parameters:
input- The input.
This can be any of the following types:null InputStreambyte []CharSequencecontaining encoded bytes according to theMarshallingContext.Builder#binaryFormat(BinaryFormat)setting.
- Returns:
- A new
ParserPipewrapper around the specified input object.
-
isReaderParser
Description copied from class:ParserSessionReturnstrue if this parser subclasses fromReaderParser.- Overrides:
isReaderParserin classParserSession- Returns:
true if this parser subclasses fromReaderParser.
-
getBinaryFormat
Binary input format.- Returns:
- The format to use when converting strings to byte arrays.
- See Also:
-
hasNativeBytes
Returns whether this binary parser has a native byte-array wire type.Mirror of
OutputStreamSerializerSession.hasNativeBytes()for the parse side. Whentrue,byte[]payloads are consumed natively from the binary stream (e.g. MsgPackbinfamily, CBOR byte-string major type 2, BSON binary subtype0x05) andBinarySwapskips so the raw bytes reach the bean property directly. Whenfalsethe parser surfacesbyte[]payloads as a string (UTF-8 column for Parquet, plain literal for binary RDF) andBinarySwapfires to apply the configuredBinaryFormatreverse decoding back tobyte[].Defaults to
true. Subclasses without a native byte-array wire type (e.g.ParquetParserSessionand the binary RDF parser sessions) override and returnfalse.- Returns:
trueif this parser has a native byte-array wire type.
-