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
IOException
public static byte[] marshallObjectToXML(Object jaxbModel, URL schemaURL) throws JAXBException, IOException, SAXException
JAXBException
IOException
SAXException
public static <T> T unmarshallXMLtoObject(byte[] xmlObject, Class<T> objectClass, URL schemaURL) throws JAXBException, IOException, SAXException
JAXBException
IOException
SAXException
public static Map<String,byte[]> unzip(byte[] zippedContent) throws IOException
IOException
public static File createTempDirectory(String prefix) throws IOException
IOException
public static void saveDocument(Document document, File destination) throws IOException, TransformerException
IOException
TransformerException
Copyright © 2020 Bonitasoft S.A. All rights reserved.