* @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();
Iterator iter = filters.iterator();
String nextFilter = null;
boolean done = false;
while( iter.hasNext() && !done )
{
os.reset();
nextFilter = (String)iter.next();
if( stopFilters.contains( nextFilter ) )
{
done = true;
}
else
{
Filter filter = manager.getFilter( COSName.getPDFName(nextFilter) );
filter.decode( is, os, stream );
is = new ByteArrayInputStream( os.toByteArray() );
}
}
return is;