}
pw.write("</versions>\n");
} else { // logging style output
response.setContentType("text/plain; charset=UTF-8");
ServerUtilitySerializer ser = new ServerUtilitySerializer(pw);
for (String curpid : pids) {
ser.startObject(curpid);
for (String curdsID : datastreams) {
ser.startDatastream(curdsID);
Date[] versions;
try {
versions = apimDefault.modifyDatastreamControlGroup(context, curpid, curdsID, controlGroup, addXMLHeader, reformat, setMIMETypeCharset);
} catch (DatastreamNotFoundException e) {
versions = null;
}
ser.writeVersions(versions);
ser.endDatastream();
}
ser.endObject();
}
ser.finish();
}
pw.flush();
} catch (ObjectNotFoundException e) {