net.sourceforge.jsh3modtool.modpackage
Class JarModPackage

java.lang.Object
  extended by net.sourceforge.jsh3modtool.modpackage.JarModPackage
All Implemented Interfaces:
ModPackage

public class JarModPackage
extends java.lang.Object
implements ModPackage

A jar file package. The mod is packed into a jar file, this class handles the extraction of the files from the jar file.

Author:
redsolo

Constructor Summary
protected JarModPackage(java.io.File file)
           
 
Method Summary
 boolean entryExists(java.lang.String entryName)
          Returns whetever the entry exists or not.
 java.io.InputStream getEntry(java.lang.String entryName)
          Returns an input stream for the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarModPackage

protected JarModPackage(java.io.File file)
                 throws java.io.IOException
Parameters:
file - the jar file.
Throws:
java.io.IOException - thrown if the file does not exist.
Method Detail

getEntry

public java.io.InputStream getEntry(java.lang.String entryName)
                             throws java.io.IOException
Description copied from interface: ModPackage
Returns an input stream for the specified name.

Specified by:
getEntry in interface ModPackage
Parameters:
entryName - name of the entry to return as an input stream.
Returns:
an InputStream for the entry.
Throws:
java.io.IOException - thrown if the entry couldnt be found.

entryExists

public boolean entryExists(java.lang.String entryName)
Description copied from interface: ModPackage
Returns whetever the entry exists or not.

Specified by:
entryExists in interface ModPackage
Parameters:
entryName - the name of the entry.
Returns:
true if the entry exists; false otherwise.


Copyright © 2005 sourceforge.net. All Rights Reserved.