mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 09:12:22 +00:00
Added a default costructor for Java's FlatBufferBuilder.
Default's size of 1024b like in cpp. Fixes #190.
This commit is contained in:
@@ -52,6 +52,13 @@ public class FlatBufferBuilder {
|
|||||||
bb = newByteBuffer(initial_size);
|
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
|
* Alternative constructor allowing reuse of {@link ByteBuffer}s. The builder
|
||||||
* can still grow the buffer as necessary. User classes should make sure
|
* can still grow the buffer as necessary. User classes should make sure
|
||||||
|
|||||||
Reference in New Issue
Block a user