com.googlecode.jpattern.core.util
Class FileHelper

java.lang.Object
  extended by com.googlecode.jpattern.core.util.FileHelper

public abstract class FileHelper
extends Object

Author:
Francesco Cina' 21/lug/2010

Constructor Summary
FileHelper()
           
 
Method Summary
static String getExtension(String filename)
           
static String removeExtension(String filename)
           
static String removePath(String filename)
          Restituisce il nome del file privo del path
static void zipFiles(String[] files, String zipfilename, boolean ignorePath, int compressionLevel)
          Crea un file compresso da una lista di file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHelper

public FileHelper()
Method Detail

zipFiles

public static void zipFiles(String[] files,
                            String zipfilename,
                            boolean ignorePath,
                            int compressionLevel)
                     throws Exception
Crea un file compresso da una lista di file

Parameters:
files - array di nomi di file da includere nello zip finale
zipfilename - nome del file zip che deve essere creato
ignorePath - se true archivia i file senza il loro path
compressionLevel - livello di compressione, varia da 1 (non compresso) a 9 (massima compressione)
Throws:
Exception

removePath

public static String removePath(String filename)
Restituisce il nome del file privo del path

Parameters:
fName - il nome completo del file (comprendente il path)
Returns:
il nome del file privo del path

removeExtension

public static String removeExtension(String filename)

getExtension

public static String getExtension(String filename)


Copyright © 2011. All Rights Reserved.