}
elem.addContent(entriesElem);
}
public JaasAcl readAcl(Element elem) throws IOException {
JaasAcl acl = createNewAcl();
//get name:
Element nameElem = elem.getChild("name");
if (nameElem != null)
acl.setName(nameElem.getText());
//get entries:
Element entriesElem = elem.getChild("entries");
List entries = (List) new ListSerializer(serializer, "entry").read(entriesElem);
for (int i=0; i<entries.size(); i++)
acl.addEntry((JaasAclEntry)entries.get(i));
return acl;
}