/** * print the contents of a magic file * * @param stream DOCUMENT ME! * * @throws MagicParseException DOCUMENT ME! */ public static void printMagicFile(PrintStream stream) throws MagicParseException { if (!initialized) { initialize(); } Collection matchers = Magic.getMatchers(); log.debug("have " + matchers.size() + " matches"); MagicMatcher matcher = null; Iterator i = matchers.iterator(); while (i.hasNext()) { matcher = (MagicMatcher) i.next(); log.debug("printing"); printMagicMatcher(stream, matcher, ""); } }
/** * print the contents of a magic file * * @param stream DOCUMENT ME! * * @throws MagicParseException DOCUMENT ME! */ public static void printMagicFile(PrintStream stream) throws MagicParseException { if (!initialized) { initialize(); } Collection<MagicMatcher> matchers = Magic.getMatchers(); log.debug("have " + matchers.size() + " matches"); MagicMatcher matcher = null; Iterator<MagicMatcher> i = matchers.iterator(); while (i.hasNext()) { matcher = (MagicMatcher) i.next(); log.debug("printing"); printMagicMatcher(stream, matcher, ""); } }