private void giveReturnedStructuresToCallback(WsClassStructureReturn raw, GetLdapStructuresCallback callback) {
if (Thread.currentThread().isInterrupted()) {
callback.cancelled();
return;
}
ClassStructureXmlPersistor xmlHandler = new ClassStructureXmlPersistor();
String[] compressedData = raw.getCompressedStructureStrings();
ObjectClassStructure[] structs = new ObjectClassStructure[compressedData.length];
for (int n = 0, len = compressedData.length; n < len; ++n) {
try {
String uncompr = JitterbitServerEncoding.base64DecodeAndInflateString(compressedData[n]);
ObjectClassStructure e = xmlHandler.load(uncompr);
structs[n] = e;
} catch (DataFormatException ex) {
callback.caught(new IntegrationServerException("The data returned by the server is corrupt", ex));
}
}