mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Java: Added ByteBufferFactory interface and sizedInputStream method. (#4379)
The ByteBufferFactory interface gives the user an option to specify the method in which the internal ByteBuffer is allocated. This provides flexibility in the type of ByteBuffer that can be used. The sizedInputStream method is an alternative to sizedByteArray that does not make a copy of the data in memory.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
f20204180d
commit
625c989875
@@ -160,7 +160,7 @@ public final class Monster extends Table {
|
||||
while (span != 0) {
|
||||
int middle = span / 2;
|
||||
int tableOffset = __indirect(vectorLocation + 4 * (start + middle), bb);
|
||||
int comp = compareStrings(__offset(10, bb.array().length - tableOffset, bb), byteKey, bb);
|
||||
int comp = compareStrings(__offset(10, bb.capacity() - tableOffset, bb), byteKey, bb);
|
||||
if (comp > 0) {
|
||||
span = middle;
|
||||
} else if (comp < 0) {
|
||||
|
||||
Reference in New Issue
Block a user