use of org.apache.camel.component.atmos.dto.AtmosFileDownloadResult in project camel by apache.
the class AtmosAPIFacade method get.
/**
* Get the content of every file inside the remote path.
*
* @param remotePath the remote path where to download from
* @return a AtmosResult object with the content (ByteArrayOutputStream) of
* every files inside the remote path.
* @throws AtmosException
*/
public AtmosResult get(String remotePath) throws AtmosException {
AtmosResult result = new AtmosFileDownloadResult();
//a map representing for each path the result of the baos
Map<String, ByteArrayOutputStream> resultEntries = new HashMap<String, ByteArrayOutputStream>();
//iterate from the remotePath
downloadFilesInFolder(remotePath, resultEntries);
//put the map of baos as result
result.setResultEntries(resultEntries);
return result;
}
Aggregations