DoubleBuffer reset() methods in Java with Examples
The reset() method of java.nio.DoubleBuffer Class is used to reset the position of this buffer to a position which was previously-marked. In this, neither a marked value is changed nor discarded. It helps to recover the previously marked value in the buffer.
public final DoubleBuffer reset()
Parameters: The method does not take any parameters.
Return Value: This method returns this buffer.
Below are the examples to illustrate the reset() method:
position before reset: 4 position after reset: 2
position before reset: 1 new position is less than the position we marked before Exception throws: java.nio.InvalidMarkException
My Personal Notes arrow_drop_up
Please Login to comment...