public class IoHelper extends Object
| Constructor and Description |
|---|
IoHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStreamToJar(InputStream zin,
ZipOutputStream out,
String currentName,
long fileTime) |
static File |
copyToTempFile(File templateFile,
String defaultExtension)
Creates a temp file with delete on exit rule.
|
static File |
copyToTempFile(String template,
String defaultExtension)
Creates a temp file with delete on exit rule.
|
static File |
existingParent(File path)
Returns the first existing parent directory in a path
|
static long |
getFreeSpace(String path)
Returns the free (disk) space for the given path.
|
static boolean |
supported(String method)
Returns whether the given method will be supported with the given environment.
|
static String |
translatePath(String destination)
Translates a path.
|
static String |
translatePath(String destination,
Variables variables)
Translates a relative path to a local system path.
|
public static File copyToTempFile(String template, String defaultExtension) throws IOException
template - file path to copy from and define file extensiondefaultExtension - file extension if no is contained in templateIOException - if an I/O error occurredpublic static File copyToTempFile(File templateFile, String defaultExtension) throws IOException
templateFile - file to copy from and define file extensiondefaultExtension - file extension if no is contained in templateIOException - if an I/O error occurredpublic static long getFreeSpace(String path)
path - path for which the free space should be detectedpublic static boolean supported(String method)
method - name of the methodRuntimeException - if the given method name does not existpublic static File existingParent(File path)
path - path which should be scannedpublic static String translatePath(String destination, Variables variables)
destination - the path to translatevariables - used to replaces variables in the pathpublic static String translatePath(String destination)
destination - the path to translatepublic static void copyStreamToJar(InputStream zin, ZipOutputStream out, String currentName, long fileTime) throws IOException
IOExceptionCopyright © 2001–2025. All rights reserved.