eu.scape_project.pit.util
Class FileUtils

java.lang.Object
  extended by eu.scape_project.pit.util.FileUtils

public final class FileUtils
extends Object

Some file utilities used by the client and service.

Version:
${global_wrapper_version}
Author:
${global_project_prefix} Project Consortium

Field Summary
static String JAVA_TMP
          Path to the Java System temp directory
 
Method Summary
static String getFileNameFromUrl(URL inputUrl)
           
static File getSystemTempFolder()
          Get system's JAVA temporary directory.
static File getTmpFile(String name, String suffix)
          Get temporary file
static File urlToFile(URL url, String ext)
          Read file of URL into file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_TMP

public static final String JAVA_TMP
Path to the Java System temp directory

Method Detail

getFileNameFromUrl

public static String getFileNameFromUrl(URL inputUrl)
Parameters:
inputUrl -
Returns:
the file name derived from the URL

getSystemTempFolder

public static File getSystemTempFolder()
Get system's JAVA temporary directory.

Returns:
System's JAVA temporary directory

getTmpFile

public static File getTmpFile(String name,
                              String suffix)
Get temporary file

Parameters:
name - File name
suffix - Suffix
Returns:
Temp file folder

urlToFile

public static File urlToFile(URL url,
                             String ext)
                      throws IOException
Read file of URL into file.

Parameters:
url - URL where the input file is located
ext -
Returns:
Result file
Throws:
IOException


Copyright © 2013. All Rights Reserved.