Clarified in the docs how to get to the serialized bytes.

This was a frequent source of confusion, since in all implementations
the data doesn't start at offset 0 in the buffer.

Change-Id: I045966e65928e9acd9def84e215914ecb5510653
This commit is contained in:
Wouter van Oortmerssen
2016-08-10 17:53:40 -07:00
parent 205ddb175f
commit 18d67ed83b
3 changed files with 19 additions and 4 deletions

View File

@@ -238,9 +238,8 @@ flatbuffers.Builder.prototype.dataBuffer = function() {
};
/**
* Get the ByteBuffer representing the FlatBuffer. Only call this after you've
* called finish(). The actual data starts at the ByteBuffer's current position,
* not necessarily at 0.
* Get the bytes representing the FlatBuffer. Only call this after you've
* called finish().
*
* @returns {Uint8Array}
*/