快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

Reading and Writing a Properties File(From Sun)

Reading and Writing a Properties File


// Read properties file.

Properties properties = new Properties();
try {
     properties.load(new FileInputStream(
       "infilename"));
} catch (IOException e) {
}
     
// Write properties file.

try {
     properties.store(new FileOutputStream(
       "outfilename"), 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 /
         contination line
     d.e.f = another string





返回类别: 教程
上一教程: Java入门知识
下一教程: java生成JPEG 图像文件

您可以阅读与"Reading and Writing a Properties File(From Sun)"相关的教程:
· Netark FileManager 远程文件治理
· Java和javac这两个SUN公司的路盲
· Beginner: Using Servlets to display, insert and update records in database.(1)
· Sun重申一许可 并发布俩新许可
· Operators and Assignments(1)
    微笑服务 优质保证 索取样品