anecho.JamochaMUD
Class PlugInInstaller

java.lang.Object
  extended by anecho.JamochaMUD.PlugInInstaller
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class PlugInInstaller
extends java.lang.Object
implements java.awt.event.ActionListener


Constructor Summary
PlugInInstaller()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent buttonEvent)
          This method is used solely for the AWT dialogue
 void install()
          Display a file dialogue so a user may install a new plug-in.
 void remove()
          private void unzipMethod(String destPath, Vector entryList) { FileOutputStream outStream; BufferedOutputStream buffOutStream; while ((count = zin.read(data, 0, buffer)) != -1) { System.out.println("Extracting: " + entryName); outStream = new FileOutputStream(destPath + pathSep + entryName.getName()); buffOutStream = new BufferedOutputStream(outStream, buffer); int count; byte data[] = new byte[buffer]; //System.out.write(x); buffOutStream.write(data, 0, count); } }
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlugInInstaller

public PlugInInstaller()
Method Detail

install

public void install()
Display a file dialogue so a user may install a new plug-in. To make things easier, we will require JamochaMUD plug-ins to be packaged in plain old .zip files, but bearing the extension .jpa (JamochaMUD Plug-in Archive). This zipfile will contain a MANIFEST file listing, and example of which follows with comments in brackets (only NAME and PLUGCLASS are REQUIRED): NAME: Test Plug-in (Name of the plug-in) VERSION: 1.0 (Version of the plug-in) PLUGCLASS: TestPlugIn (Name of the main Java class of the plug-in) JVM: 1.1 (Minimum Java Virtual Machine needed to use the plug-in) JMUDVER: 04-01-12 (Minimum version of JamochaMUD needed... numeric portion only) LICENSE: TestPlugInDir\COPYING (location in the .jpa archive of the license file) README: TestPlugInDir\readme.txt (any special instructions for the user)


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent buttonEvent)
This method is used solely for the AWT dialogue

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
buttonEvent -

remove

public void remove()
private void unzipMethod(String destPath, Vector entryList) { FileOutputStream outStream; BufferedOutputStream buffOutStream; while ((count = zin.read(data, 0, buffer)) != -1) { System.out.println("Extracting: " + entryName); outStream = new FileOutputStream(destPath + pathSep + entryName.getName()); buffOutStream = new BufferedOutputStream(outStream, buffer); int count; byte data[] = new byte[buffer]; //System.out.write(x); buffOutStream.write(data, 0, count); } }