Class PRSPrivateIOUtils
java.lang.Object
net.thevpc.common.prs.util.PRSPrivateIOUtils
Classe utilitaire pour la manipulation des E/S
- Author:
- tbensalah (Taha Ben Salah) %creation_date date 27/01/2004 %last_modification_date date 28/01/2004
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final inttaille par defaut du buffer de transfert -
Method Summary
Modifier and TypeMethodDescriptionstatic Filetry to return CanonicaFile otherwise AbsoluteFilestatic StringcomputeCRC(byte[] bytes) static StringcomputeCRC(File file) static Stringstatic StringcomputeCRC(Reader reader) static voidcopy le flux d'entree dans le lux de sortiestatic voidcopy le flux d'entree dans le lux de sortiestatic voidcopy(File in, OutputStream out) copy le flux d'entree dans le lux de sortiestatic voidcopy(File in, OutputStream out, int bufferSize) copy le flux d'entree dans le lux de sortiestatic voidcopy(InputStream in, File out) copy le flux d'entree dans le lux de sortiestatic voidcopy(InputStream in, File out, int bufferSize) copy le flux d'entree dans le lux de sortiestatic voidcopy(InputStream in, OutputStream out) copy le flux d'entree dans le lux de sortiestatic voidcopy(InputStream in, OutputStream out, int bufferSize) copy le flux d'entree dans le lux de sortiestatic voidstatic booleandeleteFolderTree(File folder, FileFilter fileFilter) static URLstatic Stringretourne l'extension d'un fichierstatic Stringretourne le nom du fichier (sans l'extension)static StringgetFilePath(File file) try to return CanonicalPath otherwise AbsolutePathstatic StringgetNameExtension(String name) static StringgetNameWithExtension(String name, String extension) static Stringstatic StringgetRelativePath(File parent, File son) retourne le path relatifstatic StringgetURLName(URL url) static StringgetURLPath(URL repositoryURL) static booleanstatic booleanisFolderWritable(File folder) static ObjectloadObject(File physicalName) static PropertiesloadProperties(File file) static byte[]static byte[]loadStreamAsByteArray(URL url) static Stringstatic StringloadStreamAsString(URL url) static StringloadString(File physicalName) static PropertiesloadXMLProperties(File file) static ObjectloadZippedObject(File physicalName) static voidstatic voidreplaceAllInFile(File file, String oldContent, String newContent) static voidreplaceInFile(File file, String oldContent, String newContent) static voidreplaceInFolder(File folder, FileFilter fileFilter, boolean recurse, String oldContent, String newContent) static voidsaveObject(File physicalName, Object object) static voidsaveString(File physicalName, String object) static voidsaveZippedObject(File physicalName, Object object) static voidstoreProperties(File file, Properties p, String comments) static voidstoreXMLProperties(File file, Properties p, String comments) static File
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZEtaille par defaut du buffer de transfert- See Also:
-
-
Method Details
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
copy
- Throws:
IOException
-
copy
copy le flux d'entree dans le lux de sortie- Parameters:
in- entreeout- sortie- Throws:
IOException- when IO error
-
getFileNameWithoutExtension
-
getNameWithoutExtension
-
getNameExtension
-
getFileExtension
-
getNameWithExtension
-
getFilePath
-
canonize
-
getRelativePath
-
loadStreamAsByteArray
- Throws:
IOException
-
loadStreamAsByteArray
- Throws:
IOException
-
storeXMLProperties
- Throws:
IOException
-
storeProperties
- Throws:
IOException
-
loadXMLProperties
- Throws:
IOException
-
loadProperties
- Throws:
IOException
-
loadStreamAsString
- Throws:
IOException
-
loadStreamAsString
- Throws:
IOException
-
replaceInFolder
public static void replaceInFolder(File folder, FileFilter fileFilter, boolean recurse, String oldContent, String newContent) throws IOException - Throws:
IOException
-
deleteFolderTree
-
replaceInFile
public static void replaceInFile(File file, String oldContent, String newContent) throws IOException - Throws:
IOException
-
replaceAllInFile
public static void replaceAllInFile(File file, String oldContent, String newContent) throws IOException - Throws:
IOException
-
saveObject
- Throws:
IOException
-
loadObject
- Throws:
IOExceptionClassNotFoundException
-
saveString
- Throws:
IOException
-
loadString
- Throws:
IOException
-
saveZippedObject
- Throws:
IOException
-
loadZippedObject
- Throws:
IOExceptionClassNotFoundException
-
computeCRC
- Throws:
IOException
-
computeCRC
- Throws:
IOException
-
computeCRC
- Throws:
IOException
-
computeCRC
- Throws:
IOException
-
isFileURL
-
isFolderWritable
-
getURLPath
-
fileToURL
-
urlToFile
-
getURLName
-
mkdirs
- Throws:
IOException
-