void doProcess(final InputStream in, final OutputStream out)
throws ExecuteException, IOException {
final ByteArrayOutputStream errorStream = new ByteArrayOutputStream();
final Executor executor = new DefaultExecutor();
executor.setStreamHandler(new PumpStreamHandler(out, errorStream, in));
final int result = executor.execute(CommandLine.parse(NGMIN_COMMAND));
LOG.debug("result={}", result);
if (result != 0) {
throw new ExecuteException("Processing failed: " + new String(errorStream.toByteArray()), result);
}
}