Class DatasetDownloadUtils
java.lang.Object
gaiasky.util.datadesc.DatasetDownloadUtils
Utilities to fetch and uncompress datasets.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanupTempFile(String file) Remove a single file in the temp directory.static voidWe should never need to call this, as the mainGaiaSky.dispose()method already cleans up the temp directory.static voidcleanupTempFiles(boolean dataDownloads, boolean dataDescriptor) static voiddecompress(String in, File out, Dataset dataset) static voiddeleteFile(Path p) static longReturns the file size.static longfileSizeGZUncompressed(String inputFilePath) Returns the GZ uncompressed size.static booleanstatic boolean
-
Field Details
-
mirrorKeyword
- See Also:
-
-
Constructor Details
-
DatasetDownloadUtils
public DatasetDownloadUtils()
-
-
Method Details
-
fileSize
Returns the file size.- Parameters:
inputFilePath- A file.- Returns:
- The size in bytes.
-
fileSizeGZUncompressed
Returns the GZ uncompressed size.- Parameters:
inputFilePath- A gzipped file.- Returns:
- The uncompressed size in bytes.
- Throws:
IOException- If the file failed to read.
-
cleanupTempFiles
public static void cleanupTempFiles()We should never need to call this, as the mainGaiaSky.dispose()method already cleans up the temp directory. This way, we allow download resumes within the same session. -
cleanupTempFile
Remove a single file in the temp directory.- Parameters:
file- The file to remove.
-
cleanupTempFiles
public static void cleanupTempFiles(boolean dataDownloads, boolean dataDescriptor) -
deleteFile
-
decompress
-
isEnabled
-
isPathIn
-