Added a default costructor for Java's FlatBufferBuilder.

Default's size of 1024b like in cpp. Fixes #190.
This commit is contained in:
Jean-Baptiste "Jiboo" Lepesme 2015-05-11 19:17:01 +02:00
parent 39833d7cf0
commit 9fa3e2f387
1 changed files with 7 additions and 0 deletions

View File

@ -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