org.biojava.bio.structure.io.util
Class FileDownloadUtils
java.lang.Object
org.biojava.bio.structure.io.util.FileDownloadUtils
public class FileDownloadUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDownloadUtils
public FileDownloadUtils()
copy
public static void copy(File src,
File dst)
throws IOException
- Copy the content of file A to B
- Parameters:
src
- dst
-
- Throws:
IOException
getFileExtension
public static String getFileExtension(File f)
getFilePrefix
public static String getFilePrefix(File f)
downloadGzipCompressedFile
public static void downloadGzipCompressedFile(URL url,
File destination)
throws IOException
- Download the content provided at URL url and stores the result to a local file
- Parameters:
url
- destination
-
- Throws:
IOException
downloadFileIfAvailable
public static File downloadFileIfAvailable(URL url,
File destination)
throws IOException
- Throws:
IOException
toUnixPath
public static String toUnixPath(String path)
- Converts path to Unix convention and adds a terminating slash if it was omitted
- Parameters:
path
- original platform dependent path
- Returns:
- path in Unix convention
- Since:
- 3.2