List of usage examples for java.util PropertyResourceBundle handleKeySet
protected Set<String> handleKeySet()
Set
of the keys contained only in this ResourceBundle
. From source file:Main.java
public static void main(String[] args) throws IOException { String fileContent = "s1=1\n" + "s2=Main\n" + "s3=Fri Jan 31 00:00:00 IST 3913"; StringReader reader = new StringReader(fileContent); PropertyResourceBundle bundle = new Main(reader); Set keySet = bundle.handleKeySet(); Iterator keys = keySet.iterator(); while (keys.hasNext()) { System.out.println("Bundle key: " + keys.next()); }/* ww w .j a v a2 s. co m*/ }
From source file:Main.java
public static void main(String[] args) throws IOException { String fileContent = "s1=1\n" + "s2=Main\n" + "s3=Fri Jan 31 00:00:00 IST 3913"; InputStream propStream = new StringBufferInputStream(fileContent); PropertyResourceBundle bundle = new Main(propStream); // Get resource key set Set keySet = bundle.handleKeySet(); Iterator keys = keySet.iterator(); while (keys.hasNext()) { System.out.println("Bundle key: " + keys.next()); }//ww w. ja v a2s . c o m }
From source file:Main.java
public static void main(String[] args) throws Exception { // Prepare content for simulating property files String fileContent = "s1=1\n" + "s2=Main\n" + "s3=Fri Jan 31 00:00:00 IST 3913"; InputStream propStream = new StringBufferInputStream(fileContent); // Create property resource bundle PropertyResourceBundle bundle = new Main(propStream); // Get resource key set Set keySet = bundle.handleKeySet(); Iterator keys = keySet.iterator(); while (keys.hasNext()) { System.out.println("Bundle key: " + keys.next()); }/* w w w.j a v a2 s . c om*/ }