Package org.bson.json
Class StrictCharacterStreamJsonWriterSettings
- java.lang.Object
-
- org.bson.json.StrictCharacterStreamJsonWriterSettings
-
public final class StrictCharacterStreamJsonWriterSettings extends java.lang.Object
Settings to control the behavior of aJSONWriter
instance.- Since:
- 3.5
- See Also:
StrictCharacterStreamJsonWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StrictCharacterStreamJsonWriterSettings.Builder
A builder for StrictCharacterStreamJsonWriterSettings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StrictCharacterStreamJsonWriterSettings.Builder
builder()
Create a builder for StrictCharacterStreamJsonWriterSettings, which are immutable.java.lang.String
getIndentCharacters()
The indent characters to use if indent mode is enabled.int
getMaxLength()
The maximum length of the JSON string.java.lang.String
getNewLineCharacters()
The new line character(s) to use if indent mode is enabled.boolean
isIndent()
The indentation mode.
-
-
-
Method Detail
-
builder
public static StrictCharacterStreamJsonWriterSettings.Builder builder()
Create a builder for StrictCharacterStreamJsonWriterSettings, which are immutable.- Returns:
- a Builder instance
-
isIndent
public boolean isIndent()
The indentation mode. If true, output will be indented. Otherwise, it will all be on the same line. The default value isfalse
.- Returns:
- whether output should be indented.
-
getNewLineCharacters
public java.lang.String getNewLineCharacters()
The new line character(s) to use if indent mode is enabled. The default value isSystem.getProperty("line.separator")
.- Returns:
- the new line character(s) to use.
-
getIndentCharacters
public java.lang.String getIndentCharacters()
The indent characters to use if indent mode is enabled. The default value is two spaces.- Returns:
- the indent character(s) to use.
-
getMaxLength
public int getMaxLength()
The maximum length of the JSON string. The string will be truncated at this length.- Returns:
- the maximum length of the JSON string
- Since:
- 3.7
-
-