public class IOUtils extends Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
createDirectoryIfNotExists(File dir) |
static File |
createSubDirectory(File directory,
String child) |
static File |
createTempDirectory(String prefix) |
static byte[] |
marshallObjectToXML(Object jaxbModel,
URL schemaURL) |
static void |
saveDocument(Document document,
File destination) |
static <T> T |
unmarshallXMLtoObject(byte[] xmlObject,
Class<T> objectClass,
URL schemaURL) |
static Map<String,byte[]> |
unzip(byte[] zippedContent) |
static byte[] |
zip(String fileName,
byte[] fileContent) |
public static byte[] zip(String fileName, byte[] fileContent) throws IOException
IOExceptionpublic static byte[] marshallObjectToXML(Object jaxbModel, URL schemaURL) throws JAXBException, IOException, SAXException
JAXBExceptionIOExceptionSAXExceptionpublic static <T> T unmarshallXMLtoObject(byte[] xmlObject,
Class<T> objectClass,
URL schemaURL)
throws JAXBException,
IOException,
SAXException
JAXBExceptionIOExceptionSAXExceptionpublic static Map<String,byte[]> unzip(byte[] zippedContent) throws IOException
IOExceptionpublic static File createTempDirectory(String prefix) throws IOException
IOExceptionpublic static void saveDocument(Document document, File destination) throws IOException, TransformerException
IOExceptionTransformerExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.