/** * Download a file from CollegeBoard's PAScoresDwnld web service. Only slight modifications were * made to this function (specifically the output and the return value). * * <p>For more information, please see: <a href= * "https://collegereadiness.collegeboard.org/educators/higher-ed/reporting-portal-help#features"> * https://collegereadiness.collegeboard.org/educators/higher-ed/reporting- * portal-help#features</a> * * <p>Original code can be accessed at: <a href= * "https://collegereadiness.collegeboard.org/zip/pascoredwnld-java-sample.zip"> * https://collegereadiness.collegeboard.org/zip/pascoredwnld-java-sample.zip </a> * * @author CollegeBoard * @param filePath File to download * @return TRUE if file download was successful<br> * FALSE if there was an error or could not find the file */ public boolean downloadFile(String filePath) { log("Getting download token for " + filePath); FileInfo fileInfo = null; String token = login(username, password); if ((token != null) && !token.isEmpty()) { fileInfo = getFileUrlByToken(token, filePath); } if (fileInfo != null) { return download(fileInfo.getFileName(), fileInfo.getFileUrl()); } return false; }