public class DownloadExternalFile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
DownloadExternalFile.DownloadCallback
Callback interface that users of this class must implement in order to receive
notification when download is complete.
|
Constructor and Description |
---|
DownloadExternalFile(JabRefFrame frame,
MetaData metaData,
java.lang.String bibtexKey) |
Modifier and Type | Method and Description |
---|---|
void |
download(DownloadExternalFile.DownloadCallback callback)
Start a download.
|
void |
download(java.net.URL url,
DownloadExternalFile.DownloadCallback callback)
Start a download.
|
void |
downloadFinished()
This is called by the download thread when download is completed.
|
java.lang.String[] |
getFileDirectory(java.lang.String link) |
java.lang.String |
getSuffix(java.lang.String link)
Look for the last '.' in the link, and returnthe following characters.
|
java.lang.String |
getSuggestedFileName(java.lang.String suffix) |
public DownloadExternalFile(JabRefFrame frame, MetaData metaData, java.lang.String bibtexKey)
public void download(DownloadExternalFile.DownloadCallback callback) throws java.io.IOException
callback
- The object to which the filename should be reported when download
is complete.java.io.IOException
public void download(java.net.URL url, DownloadExternalFile.DownloadCallback callback) throws java.io.IOException
callback
- The object to which the filename should be reported when download
is complete.java.io.IOException
public void downloadFinished()
public java.lang.String getSuggestedFileName(java.lang.String suffix)
public java.lang.String getSuffix(java.lang.String link)
link
- The linkpublic java.lang.String[] getFileDirectory(java.lang.String link)