project35.mda.config
Class FileLauncher

java.lang.Object
  extended by project35.mda.config.FileLauncher

public class FileLauncher
extends java.lang.Object

parses the file ./project35/config/FilesExtensionsToLaunch.xml. This is an optional file Project35 can read to associate file extensions with launch programs. This shows up in URL fields with the "View" button


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
FileLauncher()
           
 
Method Summary
 int getDescribedExtensionsCount()
           
 java.lang.String getLaunchCommand(java.lang.String fileExtension)
           
 void parseExtensionLauncherRegistry(java.io.InputStream inputStream)
          reads the file extensions file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLauncher

public FileLauncher()
Method Detail

getDescribedExtensionsCount

public int getDescribedExtensionsCount()

getLaunchCommand

public java.lang.String getLaunchCommand(java.lang.String fileExtension)
Parameters:
fileExtension - example would be .jpg, .gif, .html
Returns:
String the command line invocation for the program e.g: netscape

parseExtensionLauncherRegistry

public void parseExtensionLauncherRegistry(java.io.InputStream inputStream)
                                    throws javax.xml.parsers.ParserConfigurationException,
                                           Project35Exception,
                                           org.xml.sax.SAXException,
                                           java.io.IOException
reads the file extensions file

Parameters:
inputStream - the file ./project35/config/FileExtensionsToLaunch.xml
Throws:
javax.xml.parsers.ParserConfigurationException
Project35Exception
org.xml.sax.SAXException
java.io.IOException