mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-03-12 16:55:46 +00:00
18 lines
554 B
JavaScript
18 lines
554 B
JavaScript
/**
|
|
* Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark}
|
|
* before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been
|
|
* marked, sets `offset = 0`.
|
|
* @returns {!ByteBuffer} this
|
|
* @see ByteBuffer#mark
|
|
* @expose
|
|
*/
|
|
ByteBufferPrototype.reset = function() {
|
|
if (this.markedOffset >= 0) {
|
|
this.offset = this.markedOffset;
|
|
this.markedOffset = -1;
|
|
} else {
|
|
this.offset = 0;
|
|
}
|
|
return this;
|
|
};
|