📜  Java.util.PropertyResourceBundle类

📅  最后修改于: 2020-11-14 06:21:44             🧑  作者: Mango


介绍

java.util.PropertyResourceBundle类是ResourceBundle的一个具体子类,它使用属性文件中的一组静态字符串来管理语言环境的资源。以下是PropertyResourceBundle的重点-

  • 可以从InputStream或Reader(代表属性文件)构造该类。

类声明

以下是java.util.PropertyResourceBundle类的声明-

public class PropertyResourceBundle
   extends ResourceBundle

领域

从类java.util.ResourceBundle继承的字段。

类的构造函数

Sr.No. Constructor & Description
1

PropertyResourceBundle(InputStream stream)

This creates a property resource bundle from an InputStream.

2

PropertyResourceBundle(Reader reader)

This creates a property resource bundle from a Reader.

类方法

Sr.No. Method & Description
1 Enumeration getKeys()

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

2 Object handleGetObject(String key)

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

3 protected Set handleKeySet()

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

方法继承

此类从以下类继承方法-

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