final int capacity = in.readInt();
if(isLeaf()) {
entries = (E[]) new SpatialPointLeafEntry[capacity];
for(int i = 0; i < numEntries; i++) {
SpatialPointLeafEntry s = new SpatialPointLeafEntry();
s.readExternal(in);
entries[i] = (E) s;
}
}
else {
entries = (E[]) new SpatialDirectoryEntry[capacity];