title: ByteBuffer: Write to, then go back to the beginning of the buffer and write before all the data that was previously written (prepending?)
body: <p>I'm still a little shaky on using <em>ByteBuffer</em>'s.  What I want to do is have data written to the ByteBuffer, then go to the beginning of the ByteBuffer and write a byte before all of that data (the payload of a packet is written, then prepended with the header.)  How can I do that?</p>
  
  <p>Diagram:</p>
  
  <p>Buffer starts with:</p>
  
  <pre><code>|  PAYLOAD  |
  </code></pre>
  
  <p>Buffer after op code header is added (after what I want to do):</p>
  
  <pre><code>|  HEADER  |  PAYLOAD  |
  </code></pre>
  
  <p>The | just being separators of the kind of data, not literally anything.</p>