[Java][FlexBuffers] Make FlexBuffersBuilder reusable by adding clear() (#5889) (#5890)

This commit is contained in:
Markus Junginger
2020-05-07 21:26:55 +02:00
committed by GitHub
parent e84cbff673
commit c2da8d5d85
5 changed files with 38 additions and 0 deletions

View File

@@ -12,6 +12,11 @@ public class ByteBufferReadWriteBuf implements ReadWriteBuf {
this.buffer.order(ByteOrder.LITTLE_ENDIAN);
}
@Override
public void clear() {
buffer.clear();
}
@Override
public boolean getBoolean(int index) {
return get(index) != 0;