com.taleo.integration.client.customstep.util
Class IOHelper

java.lang.Object
  extended by com.taleo.integration.client.customstep.util.IOHelper

public class IOHelper
extends java.lang.Object

IO helper functions, in extension to com.taleo.integration.client.util.IOHelper.

Author:
Romain Guay, Oracle Corporation

Constructor Summary
IOHelper()
           
 
Method Summary
static java.io.File getCompressedFile(java.io.File pOriginalFile, java.io.File pTempFolder, java.lang.String pEntry)
          Get the original file compressed or the file itself if it is already compressed.
static java.io.File getDecompressedFile(java.io.File pCompressedFile)
          Get the decompressed file or the file itself if it is already decompressed.
static void getDecompressedFile(java.io.File pCompressedFile, java.io.File pDestFile)
          Get the decompressed file or the file itself if it is already decompressed, into the destination file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOHelper

public IOHelper()
Method Detail

getCompressedFile

public static java.io.File getCompressedFile(java.io.File pOriginalFile,
                                             java.io.File pTempFolder,
                                             java.lang.String pEntry)
                                      throws java.io.IOException
Get the original file compressed or the file itself if it is already compressed.

Parameters:
pOriginalFile - the original file
pTempFolder - the temporary files folder
pEntry - the actual entry name of the compressed file. Will be ignored if the attribute com.taleo.integration.compress.tempfile as been set to false, as the output won't be a ZipOutputStream.
Returns:
the compressed file
Throws:
java.io.IOException

getDecompressedFile

public static java.io.File getDecompressedFile(java.io.File pCompressedFile)
                                        throws java.io.IOException
Get the decompressed file or the file itself if it is already decompressed.

Parameters:
pCompressedFile - the compressed file
Returns:
the decompressed file
Throws:
java.io.IOException

getDecompressedFile

public static void getDecompressedFile(java.io.File pCompressedFile,
                                       java.io.File pDestFile)
                                throws java.io.IOException
Get the decompressed file or the file itself if it is already decompressed, into the destination file.

Parameters:
pCompressedFile - the compressed file
pDestFile - the destination file
Throws:
java.io.IOException