@Override
public RetrievedContent getContent(String spaceId, String contentId) {
String path = baseDirectory + "/" + spaceId + "/" + contentId;
ConnectOperation co =
new ConnectOperation(host, port, username, password, zone);
try {
ObjTypeEnum type = new IrodsOperations(co).stat(path).getObjType();
log.trace("Opening inputstream to irods path: " +
path + " type " + type);
RetrievedContent content = new RetrievedContent();
content.setContentStream(new BufferedInputStream(
new IrodsProxyInputStream(path, co.getConnection()), BLOCK_SIZE));
content.setContentProperties(getContentProperties(spaceId, contentId));
return content;
} catch (IOException e) {
log.error("Could not connect to iRODS", e);
throw new StorageException(e);
}
}