How to reread the content of a buffer?
The example shown below tells you how to reread the contents of a buffer. To reread the data from a buffer we can use the buffer's
rewind() method. This method set the position back to
0 while the limit is unchanged, it still hold the value of how many data can be read from the buffer.