fr.lip6.sma.simulacion.app
Class Bundle

java.lang.Object
  extended by fr.lip6.sma.simulacion.app.Bundle

public final class Bundle
extends Object

Classe pour gérer les données dans le fichier .jar ou séparées (MacOS X).

Version:
$Revision: 3 $
Author:
Paul Guyot
See Also:
"aucun test défini."

Constructor Summary
private Bundle()
          Constructeur par défaut non disponible.
 
Method Summary
private static String getAbsolutePath(String inPath)
          Get an absolute path from a given path (which can already be absolute).
static AudioClip getAudioClip(String inPath)
          Accesseur sur un son.
static Image getImage(String inPath)
          Accesseur sur une image.
static URL getResource(String inPath)
          Accesseur sur une ressource.
static InputStream getResourceAsStream(String inPath)
          Accesseur sur une ressource via un flux.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bundle

private Bundle()
Constructeur par défaut non disponible.

Method Detail

getResource

public static URL getResource(String inPath)
Accesseur sur une ressource.

Parameters:
inPath - le chemin de la ressource (e.g. etc/simbar.xml)
Returns:
l'URL de la ressource.

getResourceAsStream

public static InputStream getResourceAsStream(String inPath)
Accesseur sur une ressource via un flux.

Parameters:
inPath - le chemin de la ressource (e.g. etc/simbar.xml)
Returns:
un flux sur la ressource.

getImage

public static Image getImage(String inPath)
Accesseur sur une image.

Parameters:
inPath - le chemin de l'image (e.g. artwork/foo.png)
Returns:
l'image correspondante.

getAudioClip

public static AudioClip getAudioClip(String inPath)
Accesseur sur un son.

Parameters:
inPath - le chemin du son.
Returns:
le son correspondant.

getAbsolutePath

private static String getAbsolutePath(String inPath)
Get an absolute path from a given path (which can already be absolute). This method deals with changes of "user.dir" property.

Parameters:
inPath - path to make absolute.
Returns:
an absolute path corresponding to inPath.