org.emboss.jemboss
Class JembossJarUtil

java.lang.Object
  extended byorg.emboss.jemboss.JembossJarUtil

public class JembossJarUtil
extends java.lang.Object

Unpacks a Jar file into a Hashtable


Field Summary
private  java.util.Hashtable jarStore
          Hashtable containing the unpacked contents of the jar file
 
Constructor Summary
JembossJarUtil(java.lang.String jarFile)
          Given the path to a jar file unpack to a hashtable
 
Method Summary
 java.lang.Object getElement(java.lang.String el)
          Return an element of the hashtable
 java.util.Hashtable getHash()
          Return the hashtable
 boolean writeByteFile(java.lang.String el, java.lang.String f)
          Write contents of an element in the hashtable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jarStore

private java.util.Hashtable jarStore
Hashtable containing the unpacked contents of the jar file

Constructor Detail

JembossJarUtil

public JembossJarUtil(java.lang.String jarFile)
               throws java.lang.Exception
Given the path to a jar file unpack to a hashtable

Parameters:
jarFile - path to jar file to unpack
Throws:
java.lang.Exception - if it is not possible to read jar file
Method Detail

getHash

public java.util.Hashtable getHash()
Return the hashtable

Returns:
jarStore the hashtable containing the contents of the jar

getElement

public java.lang.Object getElement(java.lang.String el)
Return an element of the hashtable

Parameters:
el - key of an element in the hashtable
Returns:
the hashtable containing the contents of the jar

writeByteFile

public boolean writeByteFile(java.lang.String el,
                             java.lang.String f)
Write contents of an element in the hashtable

Parameters:
el - key of an element in the hashtable
f - path of file to write to
Returns:
true if written file