Properties: load(InputStream inStream) : Properties « java.util « Java by API






Properties: load(InputStream inStream)

  

import java.io.FileInputStream;
import java.util.Properties;

public class MainClass {
  public static void main(String args[]) throws Exception {
    Properties p = new Properties();
    p.load(new FileInputStream("colon.txt"));
    p.list(System.out);
  }
}
//File: colon.txt
/*
foo:bar
one
two
three=four
five  six seven eight
nine ten
*/
           
         
    
  








Related examples in the same category

1.new Properties()
2.new Properties(Properties prop)
3.Properties: getProperty(String key)
4.Properties: getProperty(String key, String defaultValue)
5.Properties: list(PrintStream out)
6.Properties: loadFromXML(InputStream in)
7.Properties: keySet()
8.Properties: propertyNames()
9.Properties: setProperty(String key, String value)
10.Properties: store(OutputStream out, String comments)
11.Properties: storeToXML(OutputStream os, String comment)