com.fasterxml.jackson.databind.util.ObjectBuffer Maven / Gradle / Ivy
package com.fasterxml.jackson.databind.util;
import java.lang.reflect.Array;
import java.util.List;
/**
* Helper class to use for constructing Object arrays by appending entries
* to create arrays of various lengths (length that is not known a priori).
*/
public final class ObjectBuffer
{
// // // Config constants
/**
* Also: let's expand by doubling up until 64k chunks (which is 16k entries for
* 32-bit machines)
*/
private final static int SMALL_CHUNK = (1 << 14);
/**
* Let's limit maximum size of chunks we use; helps avoid excessive allocation
* overhead for huge data sets.
* For now, let's limit to quarter million entries, 1 meg chunks for 32-bit
* machines.
*/
private final static int MAX_CHUNK = (1 << 18);
// // // Data storage
private LinkedNode
© 2015 - 2025 Weber Informatics LLC | Privacy Policy