예제 #1
0
    private void joinFileFromLocalBase() throws Exception {

      String theLocalBaseDir = myProperties.getProperty("LOCALBASEDIR");
      File theLocalBase = new File(theLocalBaseDir);
      validateDirectory(theLocalBase);
      List<File> theList = getFileListingNoSort(theLocalBase);
      URI theLocalBaseURI = theLocalBase.toURI();
      Iterator it3 = theList.iterator();
      File theFile;
      URI theFileURI;
      String relative;
      String[] theFileSelectionList = new String[theList.size()];
      int j = 0;
      while (it3.hasNext()) {
        theFile = (File) it3.next();
        theFileURI = theFile.toURI();
        relative = theLocalBaseURI.relativize(theFileURI).getPath();
        theFileSelectionList[j] = relative;
        j++;
      }

      String[] theStr = FileSelectionListFrame.getFileList(theFileSelectionList);
      for (int i = 0; i < theStr.length; i++) {
        URI theJoinFileURI = new URI(theLocalBaseURI.toString() + theStr[i]);
        File theMD5File = new File(theJoinFileURI.getPath());
        // System.out.print(String.format("File %1$s Exists? %2$s",
        // theLocalBase.getAbsolutePath()+"test.txt",theMD5File.exists()));
        join(theMD5File);
      }
      System.out.println("Out of joinFileFromLocalBase");
    }
예제 #2
0
    private void emailFileFromBase() {
      getFileList();

      Set keys = myFileList.keySet();
      String[] theFileSelectionList = new String[keys.size()];
      int j = 0;
      for (Iterator i = keys.iterator(); i.hasNext(); ) {
        String key = (String) i.next();
        theFileSelectionList[j] = key;
        j++;
      }
      String[] theStr = FileSelectionListFrame.getFileList(theFileSelectionList);
      for (int i = 0; i < theStr.length; i++) {
        emailFile(theStr[i]);
      }
      // System.out.println(theStr[1]);
      //	 System.out.println(FileSelectionListFrame.getFileList(theFileSelectionList).toString());
      System.out.println("Out of downloadFileFromBase");
    }