use of de.herrlock.manga.exceptions.MDRuntimeException in project Manga by herrlock.
the class SettingsFileDownloader method execute.
public static void execute() {
logger.traceEntry();
Properties p = new Properties();
// load properties
try (InputStream fIn = new FileInputStream(Constants.SETTINGS_FILE)) {
p.load(fIn);
} catch (IOException ex) {
throw new MDRuntimeException(ex);
}
// properties loaded successful
DownloadConfiguration conf = DownloadConfiguration.create(p);
SettingsFileDownloader dlImpl = new SettingsFileDownloader(conf);
DownloadProcessor.getInstance().addDownload(dlImpl);
}
use of de.herrlock.manga.exceptions.MDRuntimeException in project Manga by herrlock.
the class IndexerMain method exportHtmlIndex.
public static void exportHtmlIndex(final OutputStream out, final IndexerConfiguration conf) {
Index index = Indexer.createIndex(conf);
try (InputStream xmlDocument = Indexer.class.getResourceAsStream("manga2datatable.xsl")) {
Source xsl = new StreamSource(xmlDocument);
Source xml = new JAXBSource(createMarshaller(), index);
Result target = new StreamResult(out);
try {
Transformer transformer = TransformerFactory.newInstance().newTransformer(xsl);
transformer.transform(xml, target);
} catch (TransformerFactoryConfigurationError | TransformerException ex) {
throw new MDRuntimeException(ex);
}
} catch (IOException | JAXBException ex) {
throw new MDRuntimeException(ex);
}
}
use of de.herrlock.manga.exceptions.MDRuntimeException in project Manga by herrlock.
the class JDExport method executeGetFileProperties.
public static void executeGetFileProperties() {
Properties p = new Properties();
try {
try (InputStream fIn = new FileInputStream(Constants.SETTINGS_FILE)) {
p.load(fIn);
}
} catch (IOException ex) {
throw new MDRuntimeException(ex);
}
execute(p);
}
Aggregations