FileDocCategorySizeDatePackage
MediaPlayerResource.javaAPI DocJMF 2.1.1e1871Mon May 12 12:20:42 BST 2003javax.media.bean.playerbean

MediaPlayerResource

public class MediaPlayerResource extends Object
Defines the resource boundle for a MediaPlayer, mainly for error messages. Invoked by the class loader.
see
MediaPlayerBeanInfo
see
MediaPlayer
see
MediaPlayerVolumePropertyEditor
see
MediaPlayerMediaLocationEditor

Fields Summary
public static ResourceBundle
resourceBundle
Defines the ResourceBundle.
Constructors Summary
Methods Summary
public static java.lang.StringgetString(java.lang.String inputString)
Gets a String that corresponds to the specified input string from a resource boundle file.

param
inputString The String from a resource boundle file.

    try
    {
      resourceBundle = ResourceBundle.getBundle(
            "javax.media.bean.playerbean.MediaPlayerInfoResBundle", Locale.getDefault());
    }
    catch (MissingResourceException e)
    {
	//System.err.println("javax.media.bean.playerbean.MediaPlayerInfoResBundle.class not found");
    }
  
    String s = null;
    try
    {
      s = resourceBundle.getString(inputString);
    }
    catch(MissingResourceException e)
    {
        //System.err.println(resourceBundle.getString("CANNOT_FIND_STRING")+inputString+
        //                resourceBundle.getString("IN_RESOURCE_FILE"));
        s = '*"+inputString+'*";
    }
    catch(Throwable e)
    {
        //System.err.println("No resource file");
        s = '*"+inputString+'*";
    }
    return s;