log.error("Analyzer: copyResultFiles: ", e);
log.error("CSMARTConsole: copyResultFiles failed: ", e);
  private void copyResultFiles(RemoteFileSystem remoteFS,                               String dirname) {    char[] cbuf = new char[1000];    try {      // FIXME: This reads just from the current directory,      // but should read from wherever the BasicMetric told it to read,      // or in general, wherever the Component says to read      // But does the AppServer support calling list on arbitrary paths?      // See bug 1668      // Maybe to generalize, let this traverse sub-directories?      String[] filenames = remoteFS.list("./");      for (int i = 0; i < filenames.length; i++) {        if (!isResultFile(filenames[i]))          continue;        File newResultFile =           new File(dirname + File.separator + filenames[i]);        InputStream is = remoteFS.read(filenames[i]);        BufferedReader reader =           new BufferedReader(new InputStreamReader(is), 1000);        BufferedWriter writer =          new BufferedWriter(new FileWriter(newResultFile));        int len = 0;        while ((len = reader.read(cbuf, 0, 1000)) != -1) {          writer.write(cbuf, 0, len);        }        reader.close();        writer.close();      }    } catch (Exception e) {      if(log.isErrorEnabled()) {        log.error("Analyzer: copyResultFiles: ", e);      }    }  }