[zz] Read and write a properties file
2010-09-03 16:08
435 查看
// Read properties file. Properties properties = new Properties(); try { properties.load(new FileInputStream("filename.properties")); } catch (IOException e) { } // Write properties file. try { properties.store(new FileOutputStream("filename.properties"), null); } catch (IOException e) { }
Here is an example of the contents of a properties file:
# a comment ! a comment a = a string b = a string with escape sequences /t /n /r // /" /' / (space) /u0123 c = a string with a continuation line / continuation line d.e.f = another string
相关文章推荐
- read and write '.bmp' file
- Read and Write a /proc File
- Readonly and Mutable, vs. Read / Write Properties
- Ubuntu Read and Write NetCDF file
- Something about file's read and write (C++)
- Read ALAsset movie file and write into the disk
- Android Study Day 3 --Android File Read And Write
- Spring Batch Read from DB and Write to File
- python.pandas read and write CSV file
- Read a Text File with VBA in Excel, and Write the Text to a Spreadsheet
- Java read and write csv file(注意事项)
- Read and Write compressed data to a binary file using ASP.NET
- Qt Write and Read XML File 读写XML文件
- How to mount partition with ntfs file system and read write access
- file read and write use java
- read numbers from file and exchange their positions then write into another file
- Read and write a FileStream at the same time
- How to mount partition with ntfs file system and read write access
- WriteAndReadFile
- Read and write flat file