public BoxRequestsFile.DownloadFile getDownloadRequest(File target, String fileId) throws IOException{
            if (!target.exists()){
                throw new FileNotFoundException();
            }
            BoxRequestsFile.DownloadFile request = new BoxRequestsFile.DownloadFile(fileId, target, getFileDownloadUrl(fileId),mSession);
            return request;
    }
public BoxRequestsFile . DownloadFile getDownloadRequest ( File target , String fileId ) throws IOException { if ( ! target . exists ( ) ) { throw new FileNotFoundException ( ) ; } BoxRequestsFile . DownloadFile request = new BoxRequestsFile . DownloadFile ( fileId , target , getFileDownloadUrl ( fileId ) , mSession ) ; return request ; }
Gets a request that downloads a given file to a target file

@param target    target file to download to, target can be either a directory or a file
@param fileId    id of the file to download
@return  request to download a file to a target file
@throws IOException throws FileNotFoundException if target file does not exist.