[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

@@ -5,6 +5,13 @@ package com.google.flatbuffers;
* FlexBuffers message.
*/
interface ReadWriteBuf extends ReadBuf {
/**
* Clears (resets) the buffer so that it can be reused. Write position will be set to the
* start.
*/
void clear();
/**
* Put a boolean into the buffer at {@code writePosition()} . Booleans as stored as single
* byte. Write position will be incremented.