public class Utilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TEMPDIRECTORYPATH
Deprecated.
use TemporaryFolderManager
|
| Constructor and Description |
|---|
Utilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanComponent(java.awt.Component baseComponent)
Method which frees the memory from JInternalFrames
|
protected static void |
cleanComponent(java.awt.Component baseComponent,
int depth) |
static void |
cleanUpTempFiles()
Deprecated.
use TemporaryFolderManager.cleanAll()
|
static javax.swing.ImageIcon |
createImageIcon(java.lang.String path)
Creates an icon from an image path.
|
static java.io.File |
createTemp(java.lang.String fileName,
java.lang.String data)
Deprecated.
use TemporaryFolderManager.createTemporaryFile()
|
static java.lang.String |
createTempDirectory()
Deprecated.
use TemporaryFolderManager.createTemporaryFolder()
|
static java.io.File |
downloadFile(java.net.URL url,
java.lang.String name)
Downloads an URL into a temporary file that is removed the next time the
tempFileManager class is called, which means the next time gvSIG is
launched.
|
static void |
extractTo(java.io.File file,
java.io.File dir,
MultiSplashWindow splash)
Extracts a ZIP file in the provided directory
|
static java.lang.String |
getTempDirectory()
Deprecated.
use TemporaryFolderManager.getTemporaryFolder()
|
static void |
removeURL(java.net.URL url)
Remove an URL from the system cache.
|
public static final java.lang.String TEMPDIRECTORYPATH
public static java.lang.String getTempDirectory()
public static void cleanUpTempFiles()
public static java.io.File createTemp(java.lang.String fileName,
java.lang.String data)
throws java.io.IOException
fileName - Name of the temporary file to createdata - The data to store in the filejava.io.IOExceptionpublic static java.lang.String createTempDirectory()
public static javax.swing.ImageIcon createImageIcon(java.lang.String path)
path - Path to the image to be loadedpublic static void cleanComponent(java.awt.Component baseComponent)
baseComponent - JInternalFrame whose memory is to be freedprotected static void cleanComponent(java.awt.Component baseComponent,
int depth)
public static void extractTo(java.io.File file,
java.io.File dir,
MultiSplashWindow splash)
throws java.util.zip.ZipException,
java.io.IOException
file - Compressed filedir - Directory to extract the filessplash - The splash window to show the extraction progressjava.util.zip.ZipException - If there is some problem in the file formatjava.io.IOException - If there is a problem reading the filepublic static java.io.File downloadFile(java.net.URL url,
java.lang.String name)
throws java.io.IOException,
java.net.ConnectException,
java.net.UnknownHostException
url - name - java.io.IOExceptionServerErrorResponseExceptionjava.net.ConnectExceptionjava.net.UnknownHostExceptionpublic static void removeURL(java.net.URL url)
request -