myFilter.processBitstream(c, myItem, myBitstream); myItem.update();
if (myFilter.processBitstream(c, myItem, myBitstream)) { myItem.update(); }
   public static void filterBitstream(Context c, Item myItem,         Bitstream myBitstream) throws Exception   {      // do we have a filter for that format?      Integer formatID = new Integer(myBitstream.getFormat().getID());      if (filterNames.containsKey(formatID))      {         // now, have we instantiated the class already?         if (!filterCache.containsKey(formatID))         {            // given a class name, load the class            Class f = Class.forName((String) filterNames.get(formatID));            MediaFilter myFilter = (MediaFilter) f.newInstance();            filterCache.put(formatID, myFilter);         }         // now get the filter and use it         MediaFilter myFilter = (MediaFilter) filterCache.get(formatID);         try         {            myFilter.processBitstream(c, myItem, myBitstream);            myItem.update(); // Make sure new bitstream has a sequence number         }         catch (Exception e)         {            System.out.println("ERROR filtering, skipping bitstream #"                  + myBitstream.getID() + " " + e);            e.printStackTrace();         }      }   }