Nuxeo Enterprise Platform 5.4

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

Constructor Summary
IOUtils()
           
 
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
 

Constructor Detail

IOUtils

public IOUtils()
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

Parameters:
file -
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 Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.