Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.connect.update.util
Class IOUtils

java.lang.Object
  extended by org.nuxeo.connect.update.util.IOUtils

public class IOUtils
extends Object

Author:
Bogdan Stefanescu

Method Summary
static File backup(org.nuxeo.connect.update.LocalPackage pkg, File file)
          Backup the given file to the package backuo directory.
static String createMd5(File file)
           
static String createMd5(String text)
           
static String md5ToHex(byte[] hash)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

backup

public static File backup(org.nuxeo.connect.update.LocalPackage pkg,
                          File file)
                   throws Exception
Backup the given file to the package backuo directory. The backup file will be returned. The name of the backup file will be: filepathMD5_filename.

Returns:
the name of the backup file.
Throws:
Exception

createMd5

public static String createMd5(String text)
                        throws Exception
Throws:
Exception

createMd5

public static String createMd5(File file)
                        throws Exception
Throws:
Exception

md5ToHex

public static String md5ToHex(byte[] hash)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.