pe.gob.sunat.tecnologia.receptor.cliente.forms
Class Util

java.lang.Object
  extended by pe.gob.sunat.tecnologia.receptor.cliente.forms.Util

public class Util
extends java.lang.Object

Metodos de uso comun de la aplicacion.

Author:
JVALDEZ
See Also:
Template, Configuration

Constructor Summary
Util()
           
 
Method Summary
 java.io.File acuseToXML(AcuseRecibo acuse, java.lang.String dirRpta)
          Contiene el objeto acuse a XML, y lo graba en la ruta dirRpta, utiliza freemaker para generar el archivo.
static java.lang.String bytesToHexString(byte[] bytes)
          Convierte un arreglo de bytes a una cadena en valor hexadecimal.
static java.io.File currentDirForDialog(java.lang.String fileName)
          Obtiene el CanonicalPath del archivo indicado en fileName
static java.lang.String getTimeNow()
          Obtiene la hora actual formateada como hh:mm:ss SSS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

currentDirForDialog

public static java.io.File currentDirForDialog(java.lang.String fileName)
Obtiene el CanonicalPath del archivo indicado en fileName

Parameters:
fileName - String
Returns:
File
See Also:
File

getTimeNow

public static java.lang.String getTimeNow()
Obtiene la hora actual formateada como hh:mm:ss SSS

Returns:
String

bytesToHexString

public static java.lang.String bytesToHexString(byte[] bytes)
Convierte un arreglo de bytes a una cadena en valor hexadecimal.

Parameters:
bytes - byte[]
Returns:
String
See Also:
Formatter

acuseToXML

public java.io.File acuseToXML(AcuseRecibo acuse,
                               java.lang.String dirRpta)
                        throws java.lang.Exception
Contiene el objeto acuse a XML, y lo graba en la ruta dirRpta, utiliza freemaker para generar el archivo.

Parameters:
acuse - AcuseRecibo
dirRpta - String
Returns:
File
Throws:
java.lang.Exception
See Also:
FileOutputStream