org.biojava.bio.structure.io.util
Class FileDownloadUtils
java.lang.Object
org.biojava.bio.structure.io.util.FileDownloadUtils
public class FileDownloadUtils
- extends java.lang.Object
|
Method Summary |
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 |
| 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(java.io.File src,
java.io.File dst)
throws java.io.IOException
- Copy the content of file A to B
- Parameters:
src - dst -
- Throws:
java.io.IOException
getFileExtension
public static java.lang.String getFileExtension(java.io.File f)
getFilePrefix
public static java.lang.String getFilePrefix(java.io.File f)
downloadGzipCompressedFile
public static void downloadGzipCompressedFile(java.net.URL url,
java.io.File destination)
throws java.io.IOException
- Download the content provided at URL url and stores the result to a local file
- Parameters:
url - destination -
- Throws:
java.io.IOException
downloadFileIfAvailable
public static java.io.File downloadFileIfAvailable(java.net.URL url,
java.io.File destination)
throws java.io.IOException
- Throws:
java.io.IOException
toUnixPath
public static java.lang.String toUnixPath(java.lang.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