}
ByteArrayOutputStream os = new ByteArrayOutputStream(BUFFER_SIZE);
ByteArrayOutputStream es = new ByteArrayOutputStream(BUFFER_SIZE / 4);
CommandRunner cr = new CommandRunner();
cr.setCommand(command + " " + System.getProperty("java.io.tmpdir")
+ " " + contentType);
cr.setInputStream(new ByteArrayInputStream(raw));
cr.setStdOutputStream(os);
cr.setStdErrorStream(es);
cr.setTimeout(timeout);
cr.evaluate();
if (cr.getExitValue() != 0)
{
return new ParseStatus(ParseStatus.FAILED, "External command "
+ command + " failed with error: " + es.toString()
+ ", contentLength " + contentLength + ", raw length "
+ Integer.toString(raw.length)).getEmptyParse(getConf());