java.util.PropertyResourceBundle Maven / Gradle / Ivy
/*
This is not an official specification document, and usage is restricted.
NOTICE
(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
Neither this file nor any files generated from it describe a complete
specification, and they may only be used as described below. For
example, no permission is given for you to incorporate this file, in
whole or in part, in an implementation of a Java specification.
Sun Microsystems Inc. owns the copyright in this file and it is provided
to you for informative, as opposed to normative, use. The file and any
files generated from it may be used to generate other informative
documentation, such as a unified set of documents of API signatures for
a platform that includes technologies expressed as Java APIs. The file
may also be used to produce "compilation stubs," which allow
applications to be compiled and validated for such platforms.
Any work generated from this file, such as unified javadocs or compiled
stub files, must be accompanied by this notice in its entirety.
This work corresponds to the API signatures of JSR 219: Foundation
Profile 1.1. In the event of a discrepency between this work and the
JSR 219 specification, which is available at
http://www.jcp.org/en/jsr/detail?id=219, the latter takes precedence.
*/
package java.util;
import java.io.InputStream;
import java.io.IOException;
/**
* PropertyResourceBundle
is a concrete subclass of
* ResourceBundle
that manages resources for a locale
* using a set of static strings from a property file. See
* {@link ResourceBundle ResourceBundle} for more information about resource
* bundles. See {@link Properties Properties} for more information
* about properties files, in particular the
* information on character encodings.
*
*
* Unlike other types of resource bundle, you don't subclass
* PropertyResourceBundle
. Instead, you supply properties
* files containing the resource data. ResourceBundle.getBundle
* will automatically look for the appropriate properties file and create a
* PropertyResourceBundle
that refers to it. See
* {@link ResourceBundle#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader) ResourceBundle.getBundle}
* for a complete description of the search and instantiation strategy.
*
*
* The following example shows a member of a resource
* bundle family with the base name "MyResources".
* The text defines the bundle "MyResources_de",
* the German member of the bundle family.
* This member is based on PropertyResourceBundle
, and the text
* therefore is the content of the file "MyResources_de.properties"
* (a related example shows
* how you can add bundles to this family that are implemented as subclasses
* of ListResourceBundle
).
* The keys in this example are of the form "s1" etc. The actual
* keys are entirely up to your choice, so long as they are the same as
* the keys you use in your program to retrieve the objects from the bundle.
* Keys are case-sensitive.
*
*
* # MessageFormat pattern
* s1=Die Platte \"{1}\" enthält {0}.
*
* # location of {0} in pattern
* s2=1
*
* # sample disk name
* s3=Meine Platte
*
* # first ChoiceFormat choice
* s4=keine Dateien
*
* # second ChoiceFormat choice
* s5=eine Datei
*
* # third ChoiceFormat choice
* s6={0,number} Dateien
*
* # sample date
* s7=3. März 1996
*
*
*
* @see ResourceBundle
* @see ListResourceBundle
* @see Properties
* @since JDK1.1
*/
public class PropertyResourceBundle extends ResourceBundle
{
/**
* Creates a property resource bundle.
* @param stream property file to read from.
*/
public PropertyResourceBundle(InputStream stream) throws IOException { }
public Object handleGetObject(String key) {
return null;
}
/**
* Implementation of ResourceBundle.getKeys.
*/
public Enumeration getKeys() {
return null;
}
}