title: Reading/Writing a Serialize object (kyro) to file/disk?
body: <p>I'm trying to use Kryo to read/write objects to disk: <a href="http://code.google.com/p/kryo/" rel="nofollow">http://code.google.com/p/kryo/</a></p>
  
  <p>Couple questions: </p>
  
  <ul>
  <li><p>How do I determine the size of my byte buffer?  If I make it too small it crashes, too large it eats up lots of memory and the files are huge.  Follow up, shouldn't kyro already know how big the object is since it's the one serializing it?</p></li>
  <li><p>What is a good way to convert them from a ByteBuffer to byte array and back?</p></li>
  <li><p>Anyone have a effective and quick way of reading/writing objects to file using Kyro? My yucky xml is about 100 times faster (which includes parsing, not just i/o) which doesn't make sense according to the benchmarks.  I tried using ByteBuffer writing to FileChannel.</p></li>
  </ul>