* @throws Exception - if pipeline is not available or returned OutputStream couldn't be closed
*
*/
protected InputStream process(String uri) throws Exception {
// use the CachingOutputStream because it buffers all bytes written
CachingOutputStream os =
new CachingOutputStream(new NullOutputStream());
File c = new File(this.context.getRealPath("/"));
BackgroundEnvironment env =
new BackgroundEnvironment(uri, "", c, os, this.getLogger());
process(uri, env);
os.close();
return new ByteArrayInputStream(os.getContent());
}