public final class ParserSessionArgs extends BeanSessionArgs
Modifier and Type | Field and Description |
---|---|
static ParserSessionArgs |
DEFAULT
Default parser session args.
|
Constructor and Description |
---|
ParserSessionArgs() |
Modifier and Type | Method and Description |
---|---|
static ParserSessionArgs |
create()
Creator.
|
ParserSessionArgs |
debug(Boolean value)
Debug mode.
|
ParserSessionArgs |
fileCharset(Charset value)
File charset.
|
ParserSessionArgs |
javaMethod(Method value)
The java method that called this serializer, usually the method in a REST servlet.
|
ParserSessionArgs |
locale(Locale value)
The session locale.
|
ParserSessionArgs |
mediaType(MediaType value)
The session media type.
|
ParserSessionArgs |
outer(Object value)
The outer object for instantiating top-level non-static inner classes.
|
ParserSessionArgs |
properties(ObjectMap value)
Session-level properties.
|
ParserSessionArgs |
property(String key,
Object value)
Adds a property to this session.
|
ParserSessionArgs |
schema(HttpPartSchema value)
HTTP-part schema.
|
ParserSessionArgs |
streamCharset(Charset value)
Input stream charset.
|
ParserSessionArgs |
timeZone(TimeZone value)
The session timezone.
|
ObjectMap |
toMap()
Returns the properties defined on this object as a simple map for debugging purposes.
|
getProperty, toString
public static final ParserSessionArgs DEFAULT
public ParserSessionArgs()
public static final ParserSessionArgs create()
public ParserSessionArgs fileCharset(Charset value)
The character set to use for reading Files from the file system.
Used when passing in files to Parser.parse(Object, Class)
.
If not specified, defaults to the JVM system default charset.
value
- The new property value.
public ParserSessionArgs javaMethod(Method value)
value
- The new property value.
public ParserSessionArgs outer(Object value)
value
- The new property value.
public ParserSessionArgs streamCharset(Charset value)
The character set to use for converting InputStreams and byte arrays to readers.
Used when passing in input streams and byte arrays to Parser.parse(Object, Class)
.
If not specified, defaults to UTF-8.
value
- The new property value.
public ParserSessionArgs debug(Boolean value)
BeanSessionArgs
Enables the following additional information during parsing:
If not specified, defaults to BeanContext.BEAN_debug
.
debug
in class BeanSessionArgs
value
- The new value for this property.
public ParserSessionArgs locale(Locale value)
BeanSessionArgs
Specifies the default locale for serializer and parser sessions.
If not specified, defaults to BeanContext.BEAN_locale
.
locale
in class BeanSessionArgs
value
- The new value for this property.
public ParserSessionArgs mediaType(MediaType value)
BeanSessionArgs
Specifies the default media type value for serializer and parser sessions.
If not specified, defaults to BeanContext.BEAN_mediaType
.
mediaType
in class BeanSessionArgs
value
- The new value for this property.
public ParserSessionArgs schema(HttpPartSchema value)
BeanSessionArgs
Used for schema-based serializers and parsers to define additional formatting.
schema
in class BeanSessionArgs
value
- The new value for this property.
public ParserSessionArgs timeZone(TimeZone value)
BeanSessionArgs
Specifies the default timezone for serializer and parser sessions.
If not specified, defaults to BeanContext.BEAN_timeZone
.
timeZone
in class BeanSessionArgs
value
- The new value for this property.
public ParserSessionArgs properties(ObjectMap value)
SessionArgs
Overrides context-level properties.
properties
in class BeanSessionArgs
value
- The new value for this property.
public ParserSessionArgs property(String key, Object value)
SessionArgs
property
in class BeanSessionArgs
key
- The property key.value
- The property value.public ObjectMap toMap()
SessionArgs
toMap
in class BeanSessionArgs
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.