org.haphazard.gui
Class GlobalJarUtilities

java.lang.Object
  extended byorg.haphazard.gui.GlobalJarUtilities

public class GlobalJarUtilities
extends java.lang.Object

Handles the parsing and loading of graphics.jar


Method Summary
 java.io.InputStream getInputStream(java.lang.String entry)
          Opens an input stream from an jar file entry
static GlobalJarUtilities getInstance()
          Gets an instance of the global graphics utilities
 java.net.URL getURL(java.lang.String entry)
          Gets an URL to an entry in the jar file
 void setGraphics(java.io.File file)
          Sets the input directory or graphics.jar for the graphic
 java.lang.String toEntry(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GlobalJarUtilities getInstance()
Gets an instance of the global graphics utilities

Returns:
An instance of the utilities

setGraphics

public void setGraphics(java.io.File file)
Sets the input directory or graphics.jar for the graphic

Parameters:
file - The directory or graphics.jar to use

getURL

public java.net.URL getURL(java.lang.String entry)
Gets an URL to an entry in the jar file

Parameters:
entry - The entry to be found
Returns:
An URL to the file

getInputStream

public java.io.InputStream getInputStream(java.lang.String entry)
Opens an input stream from an jar file entry

Parameters:
entry - The entry to open
Returns:
An opened input stream

toEntry

public java.lang.String toEntry(java.io.File file)