Created
April 4, 2017 01:39
-
-
Save easai/7af8845140be0881c08ec096a03a53d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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