com.fasterxml.jackson.core

## Class StreamReadConstraints.Builder

- java.lang.Object
- - com.fasterxml.jackson.core.StreamReadConstraints.Builder

Enclosing class:
  StreamReadConstraints

    public static final class StreamReadConstraints.Builder
    extends Object

### Method Summary

All Methods Instance Methods Concrete Methods
`StreamReadConstraints` `build()`
`StreamReadConstraints.Builder` `maxNestingDepth(int maxNestingDepth)` Sets the maximum nesting depth.
`StreamReadConstraints.Builder` `maxNumberLength(int maxNumLen)` Sets the maximum number length (in chars or bytes, depending on input context).
`StreamReadConstraints.Builder` `maxStringLength(int maxStringLen)` Sets the maximum string length (in chars or bytes, depending on input context).

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### maxNestingDepth

    public StreamReadConstraints.Builder maxNestingDepth(int maxNestingDepth)

Sets the maximum nesting depth. The depth is a count of objects and arrays that have not been closed, `{` and `[` respectively.

Parameters:
  `maxNestingDepth` - the maximum depth
Returns:
  this builder
Throws:
  `IllegalArgumentException` - if the maxNestingDepth is set to a negative value
Since:
  2.15

#### maxNumberLength

    public StreamReadConstraints.Builder maxNumberLength(int maxNumLen)

Sets the maximum number length (in chars or bytes, depending on input context). The default is 1000.

Parameters:
  `maxNumLen` - the maximum number length (in chars or bytes, depending on input context)
Returns:
  this builder
Throws:
  `IllegalArgumentException` - if the maxNumLen is set to a negative value
Since:
  2.15

#### maxStringLength

    public StreamReadConstraints.Builder maxStringLength(int maxStringLen)

Sets the maximum string length (in chars or bytes, depending on input context). The default is 5,000,000. This limit is not exact, the limit is applied when we increase internal buffer sizes and an exception will happen at sizes greater than this limit. Some text values that are a little bigger than the limit may be treated as valid but no text values with sizes less than or equal to this limit will be treated as invalid.

Setting this value to lower than the `maxNumberLength(int)` is not recommended.

Parameters:
  `maxStringLen` - the maximum string length (in chars or bytes, depending on input context)
Returns:
  this builder
Throws:
  `IllegalArgumentException` - if the maxStringLen is set to a negative value
Since:
  2.15

#### build

    public StreamReadConstraints build()