Skip to content

Commit

Permalink
javadoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jul 11, 2019
1 parent 9e57cbf commit d88d8f0
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions src/main/java/com/fasterxml/jackson/core/util/BufferRecycler.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,38 @@ public class BufferRecycler
*/
public final static int BYTE_BASE64_CODEC_BUFFER = 3;

public final static int CHAR_TOKEN_BUFFER = 0; // Tokenizable input
public final static int CHAR_CONCAT_BUFFER = 1; // concatenated output
public final static int CHAR_TEXT_BUFFER = 2; // Text content from input
public final static int CHAR_NAME_COPY_BUFFER = 3; // Temporary buffer for getting name characters
/**
* Buffer used as input buffer for tokenization for character-based parsers.
*/
public final static int CHAR_TOKEN_BUFFER = 0;

/**
* Buffer used by generators; for byte-backed generators for buffering of
* {@link String} values to output (before encoding into UTF-8),
* and for char-backed generators as actual concatenation buffer.
*/
public final static int CHAR_CONCAT_BUFFER = 1;

/**
* Used through {@link TextBuffer}: directly by parsers (to concatenate
* String values)
* and indirectly via
* {@link com.fasterxml.jackson.core.io.SegmentedStringWriter}
* when serializing (databind level {@code ObjectMapper} and
* {@code ObjectWriter}). In both cases used as segments (and not for whole value),
* but may result in retention of larger chunks for big content
* (long text values during parsing; bigger output documents for generation).
*/
public final static int CHAR_TEXT_BUFFER = 2;

/**
* For parsers, temporary buffer into which {@code char[]} for names is copied
* when requested as such; for {@code WriterBasedGenerator} used for buffering
* during {@code writeString(Reader)} operation (not commonly used).
*/
public final static int CHAR_NAME_COPY_BUFFER = 3;

// Buffer lengths, defined in 2.4 (smaller before that)
// Buffer lengths

private final static int[] BYTE_BUFFER_LENGTHS = new int[] { 8000, 8000, 2000, 2000 };
private final static int[] CHAR_BUFFER_LENGTHS = new int[] { 4000, 4000, 200, 200 };
Expand Down

0 comments on commit d88d8f0

Please sign in to comment.