W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1997

Beta API questions (adding an extension)

From: Mark Friedman <mark@intraspect.com>
Date: Thu, 25 Sep 1997 17:30:36 -0700
Message-ID: <342B022C.8FFDA17B@intraspect.com>
To: www-jigsaw@w3.org, jigsaw@w3.org
In Jigsaw Alpha5, I used to do something like the following to
programmatically add an extension resource:

    // Add extension resources
    ResourceIndexer indexer = server.getIndexer();
    // Add extension resource for .exe
    if (indexer.loadExtension("exe") == null) {
      addExtension ("exe",
                    new MimeType ("application",

where addExtension is defined as:

  static void addExtension (String extString,
                            MimeType type,
                            ResourceIndexer indexer) {
    FileResource ext = new FileResource();
    ext.setValue ("identifier", extString);
    ext.setValue ("content-type", type);
    System.out.println("Added " + extString +
                       " extension resource to Jigsaw");

How would I do it now in the beta API?

Thanks in advance.

Received on Thursday, 25 September 1997 20:34:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:23 UTC