* @return A stream with decoded data.
* @throws IOException If there is an error processing the stream.
*/
public InputStream getPartiallyFilteredStream( List stopFilters ) throws IOException
{
FilterManager manager = stream.getFilterManager();
InputStream is = stream.getFilteredStream();
ByteArrayOutputStream os = new ByteArrayOutputStream();
List filters = getFilters();
String nextFilter = null;
boolean done = false;
for( int i=0; i<filters.size() && !done; i++ )
{
os.reset();
nextFilter = (String)filters.get( i );
if( stopFilters.contains( nextFilter ) )
{
done = true;
}
else
{
Filter filter = manager.getFilter( COSName.getPDFName(nextFilter) );
filter.decode( is, os, stream, i );
is = new ByteArrayInputStream( os.toByteArray() );
}
}
return is;