Properties: store(OutputStream out, String comments) : Properties « java.util « Java by API






Properties: store(OutputStream out, String comments)

  


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

public class Main {
  public static void main(String args[]) throws Exception {
    Properties p = new Properties();
    p.load(new FileInputStream("test.txt"));

    p.store(new FileOutputStream("t.txt"),"no comments");
  }
}

   
    
  








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: load(InputStream inStream)
7.Properties: loadFromXML(InputStream in)
8.Properties: keySet()
9.Properties: propertyNames()
10.Properties: setProperty(String key, String value)
11.Properties: storeToXML(OutputStream os, String comment)