protected byte[] marshall(final FormMappingModel model) throws JAXBException, IOException, SAXException { return IOUtil.marshallObjectToXML(model, xsdUrl); }
protected FormMappingModel unmarshall(final byte[] model) throws JAXBException, IOException, SAXException { return IOUtil.unmarshallXMLtoObject(model, FormMappingModel.class, xsdUrl); }
public BusinessObjectModel unmarshall(final byte[] bomXML) throws JAXBException, IOException, SAXException { return IOUtils.unmarshallXMLtoObject(bomXML, BusinessObjectModel.class, xsdUrl); }
/** * Read the contents of the given file. * * @param file the file to read */ public static String read(final File file) throws IOException { try (FileInputStream fileInputStream = new FileInputStream(file)) { return read(fileInputStream); } }
/** * Equivalent to {@link #getAllContentFrom(InputStream) getAllContentFrom(new * FileInputStream(file))}; * * @param file the file to read * @return the whole content of the file in a single String. * @throws IOException If an I/O exception occurs */ public static byte[] getAllContentFrom(final File file) throws IOException { try (InputStream in = new FileInputStream(file)) { return getAllContentFrom(in); } }
public static byte[] generateJar(final Class<?>... classes) throws IOException { return generateJar(getResources(classes)); }
public byte[] marshallToXML(final ApplicationNodeContainer applicationNodeContainer) throws JAXBException, IOException, SAXException { return IOUtils.marshallObjectToXML(applicationNodeContainer, ApplicationNodeContainer.class.getResource(APPLICATION_XSD)); }
public static Properties getProperties(final File file) throws IOException { try (FileReader reader = new FileReader(file)) { return getProperties(reader); } }
public static boolean deleteDir(final File dir) throws IOException { return deleteDir(dir, 1, 0); }
public static void unzipToFolder(final InputStream inputStream, final File outputFolder) throws IOException { try (ZipInputStream zipInputstream = new ZipInputStream(inputStream)) { extractZipEntries(zipInputstream, outputFolder); } }
public static File createTempDirectory(final String prefix) throws IOException { final File tmpDirectory = File.createTempFile(prefix, null); return createDirectory(tmpDirectory); }
public static void writeContentToFile(final String content, final File outputFile) throws IOException { final FileOutputStream fileOutput = new FileOutputStream(outputFile); writeContentToFileOutputStream(content, fileOutput); }
public BusinessObjectModel unmarshall(final byte[] bomXML) throws JAXBException, IOException, SAXException { return IOUtils.unmarshallXMLtoObject(bomXML, BusinessObjectModel.class, xsdUrl); }
public static byte[] generateJar(final Class<?>... classes) throws IOException { return generateJar(getResources(classes)); }
public byte[] marshallToXML(final ApplicationNodeContainer applicationNodeContainer) throws JAXBException, IOException, SAXException { return IOUtils.marshallObjectToXML(applicationNodeContainer, ApplicationNodeContainer.class.getResource(APPLICATION_XSD)); }
public static boolean deleteDir(final File dir) throws IOException { return deleteDir(dir, 1, 0); }
protected byte[] marshall(final FormMappingModel model) throws JAXBException, IOException, SAXException { return IOUtil.marshallObjectToXML(model, xsdUrl); }
protected FormMappingModel unmarshall(final byte[] model) throws JAXBException, IOException, SAXException { return IOUtil.unmarshallXMLtoObject(model, FormMappingModel.class, xsdUrl); }
public static void unzipToFolder(final InputStream inputStream, final File outputFolder) throws IOException { try (ZipInputStream zipInputstream = new ZipInputStream(inputStream)) { extractZipEntries(zipInputstream, outputFolder); } }
public ApplicationNodeContainer unmarshallFromXML(final byte[] applicationXML) throws JAXBException, IOException, SAXException { return IOUtils.unmarshallXMLtoObject(applicationXML, ApplicationNodeContainer.class, ApplicationNodeContainer.class.getResource(APPLICATION_XSD)); }