title: looking for a "does everything buffer" in java- decided to work with Netty
body: <h2>Some background:</h2>
  
  <p>I working on some java packages that need to take data, divide it and distribute to many Servers online. According to the user code (person using my packages), I will know which kind of buffer to use. I have seen The Netty Project that has some interesting concepts in mind and other solutions suggested here in the site, but not exactly what I'm looking for. I guess I can implement my requirements, but I like reusing better.</p>
  
  <h2>The actual Issue: Byte Buffer Requirements</h2>
  
  <p>Separate implementation from interface.
  Change between the two implementation. </p>
  
  <p><b>Fixed Size:</b></p>
  
  <ol>
  <li>Direct memory usage.</li>
  <li>Zero Copy IO on distribution.  </li>
  </ol>
  
  <p><b>Growing Size</b></p>
  
  <ol>
  <li>Can grow to up to a certain Size.</li>
  <li>Keeps balance between reallocation and amount of memory in use.</li>
  </ol>
  
  <p>Update 1: Decided to go with the Netty project library due to a lot of other benefits.</p>
  
  <p>I wanted to give some details about my system. I need to distribute large amounts of data throughout a network of servers. I have very low amount of knowledge regarding the size of my buffers. Sometimes it can be fixed sizes, sometimes it can be in unknown size mode. I want to be able to develop a mechanism that enjoys the benefit of both worlds. I do have a defined event when I receive the final buffer for inspection. </p>
  
  <p>I understand that buffers can perform better when they are directly mapped to memory. Netty provides this for me, but I can't make this buffer grow. I have dynamic buffer which can grow -Netty provides that too.</p>
  
  <p>Couple of questions:</p>
  
  <ol>
  <li><p>should I copy the buffer to from dynamic to direct in case it is changed? Is there a way to switch modes? </p></li>
  <li><p>What do you think of implementing a class that holds an array of ChannleBuffers and exposes the same interface like ChannleBuffer while containing "inside" an array of buffers allocating new direct memory as needed. </p></li>
  <li><p>Do you have other solutions in mind ? </p></li>
  </ol>