dk.brics.bisimulationGame
Class JarResources

java.lang.Object
  extended by dk.brics.bisimulationGame.JarResources

public class JarResources
extends java.lang.Object

A class for reading resources from a jar file. Inspired by JavaWorld Tip 49

Author:
Martin Mosegaard martinm@daimi.au.dk

Constructor Summary
JarResources()
           
 
Method Summary
static byte[] getResource(java.lang.String jarFileName, java.lang.String resourceName)
          Tries to open a jar file, extract a given resource and return the resource data as a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarResources

public JarResources()
Method Detail

getResource

public static byte[] getResource(java.lang.String jarFileName,
                                 java.lang.String resourceName)
Tries to open a jar file, extract a given resource and return the resource data as a byte array.

Parameters:
jarFileName - Name of the jar file
resourceName - Name of the resource file
Returns:
A byte array representation of a jar resource