public static void dump(IRtfParser parser, String filename, String outputFilename) throws Exception
   {
      File outputFile = new File(outputFilename);

      InputStream is = null;
      OutputStream os = null;

      try
      {
         is = StandardRtfParserTest.class.getResourceAsStream("data/" + filename + ".rtf");
         os = new FileOutputStream(outputFile);
         parser.parse(new RtfStreamSource(is), new RtfDumpListener(os));
      }

      finally
      {
         if (is != null)
         {
            try
            {
               is.close();
            }

            finally
            {
               // Ignored
            }
         }

         if (os != null)
         {
            try
            {
               os.close();
            }

            finally
            {
               // Ignored
            }
         }
      }
   }