MediaFilter myFilter = (MediaFilter)PluginManager.getNamedPlugin( MediaFilter.class, myBitstream.getFormat().getShortDescription()); if (myFilter != null) { try {
boolean filtered = false;    for (int i = 0; i < filterClasses.length; i++) { List fmts = (List)filterFormats.get(filterClasses[i].getClass().getName()); if (fmts.contains(myBitstream.getFormat().getShortDescription())) {
    public static boolean filterBitstream(Context c, Item myItem,            Bitstream myBitstream) throws Exception    {        // do we have a filter for that format?        MediaFilter myFilter = (MediaFilter)PluginManager.getNamedPlugin(                                  MediaFilter.class,                                  myBitstream.getFormat().getShortDescription());        if (myFilter != null)        {            try            {                // only update item if bitstream not skipped                if (myFilter.processBitstream(c, myItem, myBitstream))                {                    myItem.update(); // Make sure new bitstream has a sequence                                     // number                    return true;                }            }            catch (Exception e)            {                System.out.println("ERROR filtering, skipping bitstream #"                        + myBitstream.getID() + " " + e);                e.printStackTrace();            }        }        return false;    }