title: Collection Serialization with Kryo
body: <p>I'm trying to use <a href="https://github.com/EsotericSoftware/kryo" rel="nofollow">kryo</a> to serialize and deserialize a java collection.</p>
  
  <p>The serializetion method looks like this:</p>
  
  <pre><code>public &lt;T&gt; byte[] serialize(List&lt;T&gt; objectsToSerialize) {
  CollectionSerializer cs = new CollectionSerializer();
  Output output = new Output();
  cs.write(kryo, output, objectsToSerialize);
  return output.toBytes();
  }
  </code></pre>
  
  <p>Now I would like to write the deserialization method but having trouble doing so. Basically the CollectionSerializer has a read method, but I can't understand how to use it (and the documentation is pretty poor as far as I can tell).</p>
  
  <p>Any ideas?</p>