public final static SetImplementation readLuposSet(final InputStream in) throws IOException, ClassNotFoundException {
final int size = InputHelper.readLuposInt(in);
if (size < 0){
return null;
}
final SetImplementation set = new SetImplementation();
if(size==0){
return set;
}
final Class type = Registration.deserializeId(in)[0];
for (int i = 0; i < size; i++) {
try {
set.add((Serializable)Registration.deserializeWithoutId(type, in));
} catch (final URISyntaxException e) {
throw new IOException(e.getMessage());
}
}
return set;