p12f.exe.pasarelapagos.helpers
Class DataFileUtils

java.lang.Object
  extended byp12f.exe.pasarelapagos.helpers.DataFileUtils

public class DataFileUtils
extends java.lang.Object


Method Summary
static boolean changePermissions(java.lang.String completeFileName, int permissions)
           
static java.lang.String doBuildPaymentReceiptFile(PaymentRequestData paymentRequestData, PresentationRequestData presentationRequestData, ProtocolData protocolData)
           
static byte[] getFileBytes(java.io.File f)
          Devuelve un array de bytes que representa al fichero/directorio pasado como parámetro.
static byte[] getFileListBytes(java.lang.String[] filesPath)
          Devuelve un zip con todos los ficheros que se le hayan pasado por parámetro.
static long getFileSize(java.io.File f)
          Devuelve el tamaño de un fichero/directorio.
static DataFileResponse renameFile(java.lang.String oldNamePath, java.lang.String newName)
          Renombre un fichero.
static DataFileResponse uploadAndUnzipFile(java.lang.String path, java.lang.String base64content, boolean rewriteFiles)
           
static DataFileResponse uploadFile(java.lang.String path, java.lang.String base64content, boolean rewriteFiles)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFileBytes

public static byte[] getFileBytes(java.io.File f)
                           throws java.io.IOException
Devuelve un array de bytes que representa al fichero/directorio pasado como parámetro. En el caso que sea un directorio, los bytes representarán a un ZIP con todos los ficheros que este contenga.

Parameters:
f -
Returns:
Throws:
java.io.IOException

getFileListBytes

public static byte[] getFileListBytes(java.lang.String[] filesPath)
                               throws java.io.IOException
Devuelve un zip con todos los ficheros que se le hayan pasado por parámetro.

Parameters:
filesPath -
Returns:
Throws:
java.io.IOException

getFileSize

public static long getFileSize(java.io.File f)
                        throws java.io.IOException
Devuelve el tamaño de un fichero/directorio.

Parameters:
f -
Returns:
Throws:
java.io.IOException

renameFile

public static DataFileResponse renameFile(java.lang.String oldNamePath,
                                          java.lang.String newName)
Renombre un fichero.

Parameters:
newName -
Returns:

uploadFile

public static DataFileResponse uploadFile(java.lang.String path,
                                          java.lang.String base64content,
                                          boolean rewriteFiles)

uploadAndUnzipFile

public static DataFileResponse uploadAndUnzipFile(java.lang.String path,
                                                  java.lang.String base64content,
                                                  boolean rewriteFiles)

changePermissions

public static boolean changePermissions(java.lang.String completeFileName,
                                        int permissions)

doBuildPaymentReceiptFile

public static java.lang.String doBuildPaymentReceiptFile(PaymentRequestData paymentRequestData,
                                                         PresentationRequestData presentationRequestData,
                                                         ProtocolData protocolData)