@SuppressWarnings({ "rawtypes", "unchecked" })
public void writeLuposCollection(final Collection t) throws IOException {
if (t.size() > 200) {
this.os.write(255);
final DiskCollection dc;
if (t.size() > 0) {
dc = new DiskCollection(t.iterator().next().getClass());
} else {
dc = new DiskCollection(Object.class);
}
dc.addAll(t);
dc.writeLuposObject(this);
} else {
this.os.write(t.size());
if (t.size() > 0) {
Registration.serializeId(t.iterator().next(), this);
for (final Object o : t) {