/** * Start with a buffer of size `initial_size`, then grow as required. * * @param initial_size The initial size of the internal buffer to use. */ public FlatBufferBuilder(int initial_size) { this(initial_size, new HeapByteBufferFactory()); }
/** * Start with a buffer of size `initial_size`, then grow as required. * * @param initial_size The initial size of the internal buffer to use. */ public FlatBufferBuilder(int initial_size) { this(initial_size, new HeapByteBufferFactory()); }
/** * Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder * can still grow the buffer as necessary. User classes should make sure * to call {@link #dataBuffer()} to obtain the resulting encoded message. * * @param existing_bb The byte buffer to reuse. */ public FlatBufferBuilder(ByteBuffer existing_bb) { init(existing_bb, new HeapByteBufferFactory()); }
/** * Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder * can still grow the buffer as necessary. User classes should make sure * to call {@link #dataBuffer()} to obtain the resulting encoded message. * * @param existing_bb The byte buffer to reuse. */ public FlatBufferBuilder(ByteBuffer existing_bb) { init(existing_bb, new HeapByteBufferFactory()); }
/** * Start with a buffer of size `initial_size`, then grow as required. * * @param initial_size The initial size of the internal buffer to use. */ public FlatBufferBuilder(int initial_size) { this(initial_size, new HeapByteBufferFactory()); }
/** * Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder * can still grow the buffer as necessary. User classes should make sure * to call {@link #dataBuffer()} to obtain the resulting encoded message. * * @param existing_bb The byte buffer to reuse. */ public FlatBufferBuilder(ByteBuffer existing_bb) { init(existing_bb, new HeapByteBufferFactory()); }