final int collLen = istream.readInt(); for (int i = 0; i < collLen; i++) { final String sub = istream.readUTF(); subcollections.add(sub); } final SecurityManager secman = broker.getBrokerPool().getSecurityManager(); final int uid = istream.readInt(); final int gid = istream.readInt(); final int perm = istream.readByte(); 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);
name = istream.readUTF(); int collLen = istream.readInt(); for (int i = 0; i < collLen; i++) subcollections.add(istream.readUTF()); permissions.read(istream); DocumentImpl doc;
	public void read(VariableByteInputStream istream) throws IOException {		collectionId = istream.readShort();		final int collLen = istream.readInt();		for (int i = 0; i < collLen; i++) {			final String sub = istream.readUTF();			subcollections.add(sub);		}		final SecurityManager secman =			broker.getBrokerPool().getSecurityManager();		final int uid = istream.readInt();		final int gid = istream.readInt();		final int perm = istream.readByte();		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);		try {			while (true) {				final DocumentImpl doc = new DocumentImpl(broker, this);				doc.read(istream);				addDocument(doc);			}		} catch (EOFException e) {		}	}