Class JarResources

  extended by org.mbari.siam.utils.JarResources

public final class JarResources
extends java.lang.Object

JarResources: JarResources maps all resources included in a Zip or Jar file. Additionaly, it provides a method to extract one as a blob. Based on code found in "Java Tip 70" at "Java World".

Constructor Summary
JarResources(java.lang.String jarFileName)
          creates a JarResources.
Method Summary
 byte[] getResource(java.lang.String name)
          Extracts a jar resource as a blob.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public JarResources(java.lang.String jarFileName)
creates a JarResources. It extracts all resources from a Jar into an internal hashtable, keyed by resource names.

jarFileName - a jar or zip file
Method Detail


public byte[] getResource(java.lang.String name)
Extracts a jar resource as a blob.

name - a resource name.

Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.