private static Object toArrayStruct(List<AccessControl> accessControlList) throws S3Exception {
Array arr=new ArrayImpl();
String type;
Struct sct;
AccessControl ac;
Iterator<AccessControl> it = accessControlList.iterator();
while(it.hasNext()){
ac=it.next();
arr.appendEL(sct=new StructImpl());
sct.setEL(KeyConstants._id, ac.getId());
sct.setEL(PERMISSION, ac.getPermission());
type = AccessControl.toType(ac.getType());
if("Group".equalsIgnoreCase(type))
setGroup(sct,ac);
else if("CanonicalUser".equalsIgnoreCase(type))
sct.setEL(DISPLAY_NAME, ac.getDisplayName());
else
sct.setEL(KeyConstants._email, ac.getId());
}
return arr;
}