List of usage examples for org.apache.commons.io IOExceptionWithCause IOExceptionWithCause
public IOExceptionWithCause(Throwable cause)
From source file:org.apache.tika.parser.pdf.OCR2XHTML.java
@Override public void processPage(PDPage pdPage) throws IOException { try {/*from www .jav a 2 s . co m*/ startPage(pdPage); doOCROnCurrentPage(); endPage(pdPage); } catch (TikaException | SAXException e) { throw new IOExceptionWithCause(e); } catch (IOException e) { handleCatchableIOE(e); } }
From source file:org.freeplane.features.mode.Controller.java
private IControllerExecuteExtension getDefaultExecuter() { return new IControllerExecuteExtension() { public void exec(String[] command, boolean waitFor) throws IOException { LogUtils.info("execute " + Arrays.toString(command)); Process proc = Runtime.getRuntime().exec(command); waiting(waitFor, proc);/* w w w . java 2 s . com*/ } public void exec(String string, boolean waitFor) throws IOException { LogUtils.info("execute " + string); Process proc = Runtime.getRuntime().exec(string); waiting(waitFor, proc); } private void waiting(boolean waitFor, Process proc) throws IOExceptionWithCause { if (waitFor) { try { proc.waitFor(); } catch (InterruptedException e) { throw new IOExceptionWithCause(e); } } } }; }