diff --git a/java/com/google/flatbuffers/FlatBufferBuilder.java b/java/com/google/flatbuffers/FlatBufferBuilder.java index 5b1425a2d..ac6e67226 100644 --- a/java/com/google/flatbuffers/FlatBufferBuilder.java +++ b/java/com/google/flatbuffers/FlatBufferBuilder.java @@ -52,6 +52,13 @@ public class FlatBufferBuilder { bb = newByteBuffer(initial_size); } + /** + * Start with a buffer of 1KiB, then grow as required. + */ + public FlatBufferBuilder() { + this(1024); + } + /** * Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder * can still grow the buffer as necessary. User classes should make sure