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 java.lang.Object

Author:
Bogdan Stefanescu

Constructor Summary
IOUtils()
           
 
Method Summary
static java.io.File backup(org.nuxeo.connect.update.LocalPackage pkg, java.io.File file)
          Backup the given file to the package backuo directory.
static java.lang.String createMd5(java.io.File file)
           
static java.lang.String createMd5(java.lang.String text)
           
static java.lang.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 java.io.File backup(org.nuxeo.connect.update.LocalPackage pkg,
                                  java.io.File file)
                           throws java.lang.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:
java.lang.Exception

createMd5

public static java.lang.String createMd5(java.lang.String text)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

createMd5

public static java.lang.String createMd5(java.io.File file)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

md5ToHex

public static java.lang.String md5ToHex(byte[] hash)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.