Package org.apache.juneau.parser
Class ReaderParserSession
java.lang.Object
org.apache.juneau.ContextSession
org.apache.juneau.BeanSession
org.apache.juneau.parser.ParserSession
org.apache.juneau.parser.ReaderParserSession
- Direct Known Subclasses:
CsvParserSession
,JsonParserSession
,PlainTextParserSession
,UonParserSession
,XmlParserSession
Subclass of parser session objects for character-based parsers.
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReaderParserSession.Builder
create
(ReaderParser ctx) Creates a new builder for this object.final ParserPipe
createPipe
(Object input) Wraps the specified input object into aParserPipe
object so that it can be easily converted into a stream or reader.Returns the file charset defined on this session.Returns the stream charset defined on this session.final boolean
Returnstrue if this parser subclasses fromReaderParser
.protected JsonMap
Returns the properties on this bean as a map for debugging.Methods inherited from class org.apache.juneau.parser.ParserSession
cast, convertAttrToType, create, doParse, doParseIntoCollection, doParseIntoMap, getClassMeta, getDebugOutputLines, getInputAsString, getJavaMethod, getLastLocation, getListener, getListener, getListenerClass, getOuter, getPosition, getSchema, getStringBuilder, isAutoCloseStreams, isStrict, isTrimStrings, isUnbuffered, mark, onBeanSetterException, onUnknownProperty, parse, parse, parse, parse, parse, parse, parseArgs, parseIntoCollection, parseIntoMap, returnStringBuilder, setCurrentClass, setCurrentProperty, setName, setParent, setPipe, trim, trim, unmark, unswap
Methods inherited from class org.apache.juneau.BeanSession
_class, addWarning, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, create, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMediaType, getNamePropertyName, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, newGenericMap, object, string, toArray, toBeanMap, toBeanMap, toBeanMap
Methods inherited from class org.apache.juneau.ContextSession
checkForWarnings, getContext, getSessionProperties, getWarnings, isDebug, toString
-
Constructor Details
-
ReaderParserSession
Constructor.- Parameters:
builder
- The builder for this object.
-
-
Method Details
-
create
Creates a new builder for this object.- Parameters:
ctx
- The context creating this session.- Returns:
- A new builder.
-
isReaderParser
Description copied from class:ParserSession
Returnstrue if this parser subclasses fromReaderParser
.- Overrides:
isReaderParser
in classParserSession
- Returns:
true if this parser subclasses fromReaderParser
.
-
createPipe
Wraps the specified input object into aParserPipe
object so that it can be easily converted into a stream or reader.- Overrides:
createPipe
in classParserSession
- Parameters:
input
- The input.
This can be any of the following types:null Reader
CharSequence
InputStream
containing UTF-8 encoded text (or whatever the encoding specified byReaderParser.Builder.streamCharset(Charset)
).
containing UTF-8 encoded text (or whatever the encoding specified bybyte []ReaderParser.Builder.streamCharset(Charset)
).File
containing system encoded text (or whatever the encoding specified byReaderParser.Builder.streamCharset(Charset)
).
- Returns:
- A new
ParserPipe
wrapper around the specified input object.
-
getFileCharset
Returns the file charset defined on this session.- Returns:
- the file charset defined on this session.
-
getStreamCharset
Returns the stream charset defined on this session.- Returns:
- the stream charset defined on this session.
-
properties
Description copied from class:ContextSession
Returns the properties on this bean as a map for debugging.- Overrides:
properties
in classParserSession
- Returns:
- The properties on this bean as a map for debugging.
-