Package org.nuxeo.connect.update.util
Class IOUtils
- java.lang.Object
-
- org.nuxeo.connect.update.util.IOUtils
-
public class IOUtils extends Object
- Author:
- Bogdan Stefanescu
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static File
backup(org.nuxeo.connect.update.LocalPackage pkg, File file)
Backup the given file to the package backup directory.static String
createMd5(File file)
static String
createMd5(String text)
protected static MessageDigest
getMD5Digest()
static String
md5ToHex(byte[] hash)
-
-
-
Method Detail
-
backup
public static File backup(org.nuxeo.connect.update.LocalPackage pkg, File file) throws IOException
Backup the given file to the package backup directory. The backup file will be returned. The backup file will be named: MD5ofFilepath_filename.- Returns:
- the name of the backup file.
- Throws:
IOException
-
createMd5
public static String createMd5(String text) throws IOException
- Throws:
IOException
-
createMd5
public static String createMd5(File file) throws IOException
- Throws:
IOException
-
getMD5Digest
protected static MessageDigest getMD5Digest() throws IOException
- Throws:
IOException
-
md5ToHex
public static String md5ToHex(byte[] hash)
-
-