Class XMLUtil
- java.lang.Object
-
- com.neotropic.kuwaiba.modules.commercial.processman.forms.elements.XMLUtil
-
public class XMLUtil extends Object
- Author:
- Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createAttribute(XMLEventWriter xmlew, XMLEventFactory xmlef, String attrName, String attrValue)
static byte[]
getFileAsByteArray(File file)
static XMLUtil
getInstance()
static void
saveFile(String directory, String fileName, byte[] content)
Saves a file, receiving the file name and the contents as parameters.
-
-
-
Method Detail
-
getInstance
public static XMLUtil getInstance()
-
createAttribute
public boolean createAttribute(XMLEventWriter xmlew, XMLEventFactory xmlef, String attrName, String attrValue) throws XMLStreamException
- Throws:
XMLStreamException
-
getFileAsByteArray
public static byte[] getFileAsByteArray(File file)
-
saveFile
public static void saveFile(String directory, String fileName, byte[] content) throws FileNotFoundException, IOException
Saves a file, receiving the file name and the contents as parameters. If the directory structure doesn't exist, it's created- Parameters:
directory
- path to the directoryfileName
- the file namecontent
- the file content- Throws:
FileNotFoundException
IOException
-
-