subcollections = new Object2LongHashMap(collLen);
subcollections = new ObjectHashSet(collLen);
	public void read(DBBroker broker, VariableByteInputStream istream)			throws IOException {		collectionId = istream.readShort();		final int collLen = istream.readInt();		String sub;		subcollections = new Object2LongHashMap(collLen);		for (int i = 0; i < collLen; i++)			subcollections.put(istream.readUTF(), istream.readLong());		final SecurityManager secman = broker.getBrokerPool()				.getSecurityManager();		final int uid = istream.readInt();		final int gid = istream.readInt();		final int perm = (istream.readByte() & 0777);		if (secman == null) {			permissions.setOwner(SecurityManager.DBA_USER);			permissions.setGroup(SecurityManager.DBA_GROUP);		} else {			permissions.setOwner(secman.getUser(uid));			permissions.setGroup(secman.getGroup(gid).getName());		}		permissions.setPermissions(perm);		created = istream.readLong();		DocumentImpl doc;		byte resourceType;		try {			while (istream.available() > 0) {				resourceType = istream.readByte();				switch (resourceType) {					case DocumentImpl.XML_FILE :						doc = new DocumentImpl(broker, this);						break;					case DocumentImpl.BINARY_FILE :						doc = new BinaryDocument(broker, this);						break;					case -1 :						return; // EOF found					default :						LOG.warn("unknown resource type: " + resourceType);						throw new IOException(								"unable to determine resource type while reading collection "										+ getName());				}				doc.read(istream);				addDocument(broker, doc);			}		} catch (EOFException e) {		}	}