com.compomics.software.autoupdater
Class FileDAO
java.lang.Object
com.compomics.software.autoupdater.FileDAO
- Direct Known Subclasses:
- GUIFileDAO, HeadlessFileDAO
public abstract class FileDAO
- extends Object
- Author:
- Davy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDAO
public FileDAO()
createDesktopShortcut
public abstract boolean createDesktopShortcut(MavenJarFile file,
String iconName,
boolean deleteOldShortcut)
throws IOException
- creates a new Desktop Shortcut to the maven jar file
- Parameters:
file
- the maven jarfile to make a shortcut toiconName
- the name of the icon file in the resources folderdeleteOldShortcut
- if previous shortcuts containing the maven jar
file artifact id should be removed
- Throws:
IOException
addShortcutAtDeskTop
public boolean addShortcutAtDeskTop(MavenJarFile mavenJarFile)
addShortcutAtDeskTop
public boolean addShortcutAtDeskTop(MavenJarFile mavenJarFile,
String iconName)
getLocationToDownloadOnDisk
public abstract File getLocationToDownloadOnDisk(String targetDownloadFolder)
throws IOException
- Parameters:
targetDownloadFolder
-
- Returns:
-
- Throws:
IOException
unzipFile
public File unzipFile(ZipFile in,
File fileLocationOnDiskToDownloadTo)
throws IOException
- Throws:
IOException
unGzipAndUntarFile
public File unGzipAndUntarFile(GZIPInputStream in,
File fileLocationOnDiskToDownloadTo)
throws IOException
- Throws:
IOException
getMavenJarFileFromFolderWithArtifactId
public MavenJarFile getMavenJarFileFromFolderWithArtifactId(File folder,
String artifactId)
throws IOException
- Throws:
IOException
writeStreamToDisk
public File writeStreamToDisk(InputStream in,
String name,
File outputLocationFolder)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
Copyright © 2013. All Rights Reserved.