Java.util.PropertyResourceBundle Class

Java.util.PropertyResourceBundle Class


The java.util.PropertyResourceBundle class is a concrete subclass of ResourceBundle that manages resources for a locale using a set of static strings from a property file.Following are the important points about PropertyResourceBundle:

  • The class can be constructed either from an InputStream or a Reader, which represents a property file.

Class declaration

Following is the declaration for java.util.PropertyResourceBundle class:

public class PropertyResourceBundle
   extends ResourceBundle


Fields inherited from class java.util.ResourceBundle.

Class constructors

S.N.Constructor & Description
1PropertyResourceBundle(InputStream stream)

This creates a property resource bundle from an InputStream.

2PropertyResourceBundle(Reader reader)

This creates a property resource bundle from a Reader.

Class methods

S.N.Method & Description
1Enumeration<String> getKeys()

This method returns an Enumeration of the keys contained in this ResourceBundle and its parent bundles.

2Object handleGetObject(String key)

This method gets an object for the given key from this resource bundle.

3protected Set<String> handleKeySet()

This method returns a Set of the keys contained only in this ResourceBundle.

Methods inherited

This class inherits methods from the following classes:

  • java.util.ResourceBundle
  • java.util.Object

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.