Class WriterSerializerSession.Builder<SELF extends WriterSerializerSession.Builder<SELF>>
java.lang.Object
org.apache.juneau.marshall.ContextSession.Builder<SELF>
org.apache.juneau.marshall.MarshallingSession.Builder<SELF>
org.apache.juneau.marshall.MarshallingTraverseSession.Builder<SELF>
org.apache.juneau.marshall.serializer.SerializerSession.Builder<SELF>
org.apache.juneau.marshall.serializer.WriterSerializerSession.Builder<SELF>
- Direct Known Subclasses:
CsvSerializerSession.Builder,HjsonSerializerSession.Builder,HoconSerializerSession.Builder,IniSerializerSession.Builder,JsonSerializerSession.Builder,MarkdownSerializerSession.Builder,PlainTextSerializerSession.Builder,RdfSerializerSession.Builder,SseSerializerSession.Builder,TomlSerializerSession.Builder,UonSerializerSession.Builder,WriterSerializerSession.DefaultBuilder,XmlSerializerSession.Builder,YamlSerializerSession.Builder
- Enclosing class:
- WriterSerializerSession
public abstract static class WriterSerializerSession.Builder<SELF extends WriterSerializerSession.Builder<SELF>>
extends SerializerSession.Builder<SELF>
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the object.maxIndent(int value) Maximum indentation.Adds a property to this session.quoteChar(char value) Quote character.streamCharset(Charset value) Output stream charset.useWhitespace(Boolean value) Use whitespace.Methods inherited from class org.apache.juneau.marshall.serializer.SerializerSession.Builder
addBeanTypes, addRootType, javaMethod, keepNullProperties, nonDefault, resolver, schema, schemaDefault, sortCollections, sortMaps, trimEmptyCollections, trimEmptyMaps, trimStrings, uriContextMethods inherited from class org.apache.juneau.marshall.MarshallingTraverseSession.Builder
initialDepthMethods inherited from class org.apache.juneau.marshall.MarshallingSession.Builder
activeView, locale, mediaType, mediaTypeDefault, timeZone, timeZoneDefaultMethods inherited from class org.apache.juneau.marshall.ContextSession.Builder
apply, cvt, debug, properties, self, unmodifiable
-
Constructor Details
-
Builder
Constructor- Parameters:
ctx- The context creating this session.
Cannot benull .
-
-
Method Details
-
build
Description copied from class:MarshallingSession.BuilderBuild the object.- Overrides:
buildin classSerializerSession.Builder<SELF extends WriterSerializerSession.Builder<SELF>>- Returns:
- The built object.
-
maxIndent
Maximum indentation.- Parameters:
value- The new value for this property.- Returns:
- This object.
-
property
Description copied from class:ContextSession.BuilderAdds a property to this session.If the key matches a known session property (e.g.
"debug" or"ContextSession.debug" ), the value is converted viaBasicConverterand routed to the corresponding typed setter. Unknown keys are stored in the raw session properties map.- Overrides:
propertyin classSerializerSession.Builder<SELF extends WriterSerializerSession.Builder<SELF>>- Parameters:
key- The property key.
Cannot benull .value- The property value.
Can benull (resets typed properties to their default; removes raw properties).- Returns:
- This object.
-
quoteChar
Quote character.- Parameters:
value- The new value for this property.- Returns:
- This object.
-
streamCharset
Output stream charset.The character set to use when writing to OutputStreams.
Used when passing in output streams and byte arrays to
Serializer.write(Object, Object).If not specified, defaults to UTF-8.
- Parameters:
value- The new property value.
Can benull (value will not be set, defaults to UTF-8).- Returns:
- This object.
-
useWhitespace
Use whitespace.If true, whitespace is added to the output to improve readability.
- Parameters:
value- The new property value.
Can benull (value will not be set, existing value from context will be kept).- Returns:
- This object.
-