Beispiel #1
0
 /** report progress */
 public void setReportProgress(boolean reportProgress) {
   if (reportProgress) {
     if (progress == null) {
       if (!fileName.startsWith(PREFIX_TO_INDICATE_TO_PARSE_FILENAME_STRING))
         progress = new ProgressPercentage("Processing file: " + fileName, getMaximumProgress());
       else progress = new ProgressPercentage("Processing string", getMaximumProgress());
     }
   } else {
     if (progress != null) {
       progress.close();
       progress = null;
     }
   }
 }
Beispiel #2
0
 /** close associated file or database */
 public void close() throws IOException {
   reader.close();
   if (progress != null) progress.close();
 }