Skip to content

Instantly share code, notes, and snippets.

@easai
Created April 4, 2017 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save easai/7af8845140be0881c08ec096a03a53d0 to your computer and use it in GitHub Desktop.
Save easai/7af8845140be0881c08ec096a03a53d0 to your computer and use it in GitHub Desktop.
void writeProperties()
{
FileOutputStream out=null;
try
{
out=new FileOutputStream("db.properties");
DateFormat dateFormat=DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
properties.storeToXML(out,dateFormat.format(new java.util.Date()));
}
catch(Exception e){e.printStackTrace();}
finally
{
try
{
if(out!=null)
out.close();
}
catch(Exception e){e.printStackTrace();}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment