continue;
}
try {
Resource<ResourceMeta> resource = storageTree.getResource
(propValue);
ResourceMeta contents = resource.getContents();
//test filter
if (filter != null) {
String[] filterComponents = filter.split("=", 2);
if (filterComponents != null && filterComponents.length == 2) {
String key = filterComponents[0];
String test = filterComponents[1];
Map<String, String> meta = contents.getMeta();
if (meta == null || !test.equals(meta.get(key))) {
continue;
}
}
}
//finally load storage contents into a string
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
contents.writeContent(byteArrayOutputStream);
data.put(name, new String(byteArrayOutputStream.toByteArray()));
} catch (StorageException e) {
throw new ConfigurationException("Unable to load configuration key '" +
name + "' value from storage path: " + propValue, e);
} catch (IOException e) {