org.biojava.bio.structure.io.util
public class FileDownloadUtils extends java.lang.Object
Constructor and Description |
---|
FileDownloadUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(java.io.File src,
java.io.File dst)
Copy the content of file A to B
|
static java.io.File |
downloadFileIfAvailable(java.net.URL url,
java.io.File destination) |
static void |
downloadGzipCompressedFile(java.net.URL url,
java.io.File destination)
Download the content provided at URL url and stores the result to a local file
|
static java.lang.String |
getFileExtension(java.io.File f) |
static java.lang.String |
getFilePrefix(java.io.File f) |
static java.lang.String |
toUnixPath(java.lang.String path)
Converts path to Unix convention and adds a terminating slash if it was omitted
|
public static void copy(java.io.File src, java.io.File dst) throws java.io.IOException
src
- dst
- java.io.IOException
public static java.lang.String getFileExtension(java.io.File f)
public static java.lang.String getFilePrefix(java.io.File f)
public static void downloadGzipCompressedFile(java.net.URL url, java.io.File destination) throws java.io.IOException
url
- destination
- java.io.IOException
public static java.io.File downloadFileIfAvailable(java.net.URL url, java.io.File destination) throws java.io.IOException
java.io.IOException
public static java.lang.String toUnixPath(java.lang.String path)
path
- original platform dependent path