mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-02 02:07:25 +00:00
Make ByteBufferFactory an abstract class in order to make FlatBuffers compatible with Java7. (#5155)
Introduce a HeapByteBufferFactory singleton instance in order to reduce allocations. Clarify the usage of LITTLE_ENDIAN ByteBuffers in ByteBufferFactory.
This commit is contained in:
parent
60e94cf083
commit
78fdce28c7
2 changed files with 12 additions and 7 deletions
|
|
@ -232,7 +232,7 @@ class JavaTest {
|
|||
}
|
||||
|
||||
static void TestByteBufferFactory() {
|
||||
final class MappedByteBufferFactory implements FlatBufferBuilder.ByteBufferFactory {
|
||||
final class MappedByteBufferFactory extends FlatBufferBuilder.ByteBufferFactory {
|
||||
@Override
|
||||
public ByteBuffer newByteBuffer(int capacity) {
|
||||
ByteBuffer bb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue