Package com.fasterxml.jackson.core.util

# Class ReadConstrainedTextBuffer

java.lang.Object
com.fasterxml.jackson.core.util.TextBuffer
com.fasterxml.jackson.core.util.ReadConstrainedTextBuffer

public final class ReadConstrainedTextBuffer extends TextBuffer

## Constructor Summary

Constructors
Constructor
Description
`ReadConstrainedTextBuffer(StreamReadConstraints streamReadConstraints, BufferRecycler bufferRecycler)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`validateStringLength(int length)`
Convenience method that can be used to verify that a String of specified length does not exceed maximum specific by this constraints object: if it does, a `JsonParseException` is thrown.

### Methods inherited from class com.fasterxml.jackson.core.util.TextBuffer

`_reportBufferOverflow, append, append, append, contentsAsArray, contentsAsDecimal, contentsAsDouble, contentsAsDouble, contentsAsFloat, contentsAsFloat, contentsAsInt, contentsAsLong, contentsAsString, contentsToWriter, emptyAndGetCurrentSegment, ensureNotShared, expandCurrentSegment, expandCurrentSegment, finishAndReturn, finishCurrentSegment, fromInitial, getBufferWithoutReset, getCurrentSegment, getCurrentSegmentSize, getTextBuffer, getTextOffset, hasTextAsCharacters, releaseBuffers, resetWith, resetWithCopy, resetWithCopy, resetWithEmpty, resetWithShared, resetWithString, setCurrentAndReturn, setCurrentLength, size, toString`

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

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

## Constructor Details

### ReadConstrainedTextBuffer

public ReadConstrainedTextBuffer(StreamReadConstraints streamReadConstraints, BufferRecycler bufferRecycler)

## Method Details

### validateStringLength

protected void validateStringLength(int length) throws StreamConstraintsException
Convenience method that can be used to verify that a String of specified length does not exceed maximum specific by this constraints object: if it does, a `JsonParseException` is thrown.

Overrides:
  `validateStringLength` in class `TextBuffer`
Parameters:
  `length` - Length of string in input units
Throws:
  `StreamConstraintsException`