&& output.size() == 0)
{
/*
* This problably indicates an error.
*/
return new ResultImpl(context, consume_command, true, null, new DataImpl(error.toByteArray()));
}
else
{
if (error.size() > 0)
{
/*
* This indicates stdout + stderr Not clear how to
* handle this if it does indicate a real problem.
*/
return new ResultImpl(context, consume_command, true, new DataImpl(output.toByteArray()), new DataImpl(error.toByteArray()));
}
else
{
/*
* This indicates stdout without stderr.
*/
if (output.size() > 0)
{
return new ResultImpl(context, consume_command, true, new DataImpl(output.toByteArray()), null);
}
else
{
return new ResultImpl(context, consume_command, true, null, null);
}