Search in sources :

Example 1 with AtmosFileDownloadResult

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;
}
Also used : AtmosFileDownloadResult(org.apache.camel.component.atmos.dto.AtmosFileDownloadResult) HashMap(java.util.HashMap) AtmosResult(org.apache.camel.component.atmos.dto.AtmosResult) ByteArrayOutputStream(java.io.ByteArrayOutputStream)

Aggregations

ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 HashMap (java.util.HashMap)1 AtmosFileDownloadResult (org.apache.camel.component.atmos.dto.AtmosFileDownloadResult)1 AtmosResult (org.apache.camel.component.atmos.dto.AtmosResult)1