public final static NodeInPartitionTree readLuposNodeInPartitionTree(final InputStream in) throws IOException, ClassNotFoundException {
final byte type = InputHelper.readLuposByte(in);
switch (type) {
case 1:
final Collection<Bindings> coll = PagedCollection.readAndCreateLuposObject(in);
return new LeafNodeInPartitionTree(new QueryResult(coll));
default:
case 2:
final PagedCollection<NodeInPartitionTree> pcoll = PagedCollection.readAndCreateLuposObject(in);
return new InnerNodeInPartitionTree(pcoll);
}