Commit 41f0294c authored by Shai Barack's avatar Shai Barack Committed by Brian Duff

Add reset() and position() to CodedOutputByteBufferNano.

Change-Id: Ie2a9e36276ac35e10b3f8d379b5742d50a0374e9
parent 2712c421
......@@ -898,6 +898,23 @@ public final class CodedOutputByteBufferNano {
}
}
/**
* Returns the position within the internal buffer.
*/
public int position() {
return buffer.position();
}
/**
* Resets the position within the internal buffer to zero.
*
* @see #position
* @see #spaceLeft
*/
public void reset() {
buffer.clear();
}
/**
* If you create a CodedOutputStream around a simple flat array, you must
* not attempt to write more bytes than the array has space. Otherwise,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment