title: difference between bytebuffer.flip() and bytebuffer.rewind()
body: <p>I am aware that flip() set the current buffer position to 0 and set the limit to the previous buffer position whereas rewind() just set the current buffer position to 0.</p>
  <p>In the following code, either I use rewind() or flip() i get the same result.</p>
  <pre><code>byte b = 127;
  bb.put(b);
  bb.rewind();//or flip();
  
  System.out.println(bb.get());
  bb.rewind();// or flip();
  System.out.println(bb.get());
  </code></pre>
  <p>Could you provide me with a real example where the difference of these 2 methods really matters? Thanks in advance.</p>