/** * get a binary datastream as String. * * @param id the id of the resource. * @param componentId the id of the component. * @return The Stream as String. * @throws Exception If the service call fails. */ public String getDatastreamDissimination(final String id, final String componentId) throws Exception { com.yourmediashelf.fedora.client.FedoraClient restClient = getFedoraRestClient(); FedoraResponse response = com.yourmediashelf.fedora.client.FedoraClient.getDatastreamDissemination(id, componentId) .execute(restClient); return toString(response.getEntityInputStream()); }