Java Properties Save saveProperties(Properties prop, String fileName, String remark)

Here you can find the source of saveProperties(Properties prop, String fileName, String remark)

Description

save Properties

License

Apache License

Declaration

public static boolean saveProperties(Properties prop, String fileName, String remark) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import java.io.IOException;

import java.io.OutputStream;

import java.util.Properties;

public class Main {
    public static boolean saveProperties(Properties prop, String fileName, String remark) {
        OutputStream fos;/*from   ww w . j a  va2 s  .co m*/
        try {
            fos = new FileOutputStream(fileName);
            prop.store(fos, remark);
        } catch (FileNotFoundException e) {
            return false;
        } catch (IOException e) {
            return false;
        }
        return true;
    }
}

Related

  1. saveProperties(final IResource modelResource, final Properties props)
  2. saveProperties(Map map, File file, String encoding)
  3. saveProperties(Map map, Writer tmpWriter)
  4. saveProperties(Properties p, String file)
  5. saveProperties(Properties p, String sFile)
  6. saveProperties(Properties properties, File file)
  7. saveProperties(Properties properties, File propertiesFile, String comments)
  8. saveProperties(Properties properties, File propertyFile)
  9. saveProperties(Properties properties, File propFile, String propertiesName)