public static String fileDownload()

in geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/indexing/GeonamesFileDownloader.java [91:104]


  public static String fileDownload(String fAddress, String destinationDir) {
    int slashIndex = fAddress.lastIndexOf('/');
    int periodIndex = fAddress.lastIndexOf('.');

    String fileName = fAddress.substring(slashIndex + 1);
    String retFileName = "";
    if (periodIndex >= 1 && slashIndex >= 0
            && slashIndex < fAddress.length() - 1) {
      retFileName = fileUrl(fAddress, fileName, destinationDir);
    } else {
      System.err.println("path or file name.");
    }
    return retFileName;
  }