Tabnine Logo
Magic.getMatchers
Code IndexAdd Tabnine to your IDE (free)

How to use
getMatchers
method
in
net.sf.jmimemagic.Magic

Best Java code snippets using net.sf.jmimemagic.Magic.getMatchers (Showing top 2 results out of 315)

origin: jmimemagic/jmimemagic

/**
 * 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, "");
  }
}
origin: arimus/jmimemagic

/**
 * 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, "");
  }
}
net.sf.jmimemagicMagicgetMatchers

Javadoc

return the parsed MagicMatch objects that were created from the magic.xml definitions

Popular methods of Magic

  • getMagicMatch
    get a match from a stream of data
  • addHint
    Add a hint to use the specified matcher for the given extension
  • initialize
    create a parser and initialize it
  • printMagicMatch
    print a magic match
  • printMagicMatcher
    print a magic match

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Menu (java.awt)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JFrame (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now