Skip to content

Commit

Permalink
Remove DownloadUtil.
Browse files Browse the repository at this point in the history
Discussion at #42
  • Loading branch information
MattBlissett committed Mar 19, 2018
1 parent 58564c3 commit c6c8f68
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 80 deletions.
15 changes: 0 additions & 15 deletions src/main/java/org/gbif/dwca/io/ArchiveFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@

import org.gbif.dwc.DwcFiles;
import org.gbif.dwc.meta.DwcMetaFiles;
import org.gbif.util.DownloadUtil;

import java.io.File;
import java.io.IOException;
import java.net.URL;

import com.google.common.io.Files;
import org.apache.commons.lang3.StringUtils;
Expand All @@ -35,19 +33,6 @@ public class ArchiveFactory {

private static final Logger LOG = LoggerFactory.getLogger(ArchiveFactory.class);

/**
* Opens an archive from a URL, downloading and decompressing it.
*
* @param archiveUrl the location of a compressed archive or single data file
* @param workingDir writable directory to download to and decompress archive
*/
public static Archive openArchive(URL archiveUrl, File workingDir) throws IOException, UnsupportedArchiveException {
File downloadTo = new File(workingDir, "dwca-download");
File dwca = new File(workingDir, "dwca");
DownloadUtil.download(archiveUrl, downloadTo);
return openArchive(downloadTo, dwca);
}

/**
* Opens an archive from a local file and decompresses or copies it into the given archive directory.
* Make sure the archive directory does not contain files already, any existing files will be removed!
Expand Down
48 changes: 0 additions & 48 deletions src/main/java/org/gbif/util/DownloadUtil.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/test/java/org/gbif/io/DownloadUtilTest.java

This file was deleted.

0 comments on commit c6c8f68

Please sign in to comment.