惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
V2EX - 技术
V2EX - 技术
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
T
Troy Hunt's Blog
Forbes - Security
Forbes - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
Know Your Adversary
Know Your Adversary
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
月光博客
月光博客
罗磊的独立博客
Webroot Blog
Webroot Blog
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 聂微东
博客园 - 叶小钗
美团技术团队
A
Arctic Wolf
P
Palo Alto Networks Blog
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
H
Hacker News: Front Page
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
Jina AI
Jina AI
C
Cyber Attacks, Cyber Crime and Cyber Security
The Last Watchdog
The Last Watchdog
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
B
Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Privacy & Cybersecurity Law Blog

博客园 - yongwnet

项目开发文档格式 JAVA反射实例 jQuery调用WebService详解 产品经理的素质 JAVA 调用 .NET编写的WebService - yongwnet Java中实现鼠标模拟与键盘映射 Win7下轻松注册VS2008 Windows7 下的VPC 浅谈项目管理能力的提升 java多态性详解——父类引用子类对象 Java截取字符串的一些常用处理 java类加载的表现形式 extjs COMBOBOX完成类似GOOGLE搜索框(AUTOCOMPLETE) - yongwnet - 博客园 如何有效的压缩VPC虚拟磁盘 VPC 2007 Console界面消失以及解决方法 - yongwnet JAVA匿名实现多线程 - yongwnet - 博客园 java中list类和vector类的比较 JAVA深克隆
java.util.Properties类
yongwnet · 2012-12-21 · via 博客园 - yongwnet
java.util.Properties类,那么现在告诉您它是用来在一个文件中存储键-值对的,  
其中键和值是用等号分隔的</SPAN>  
  
  
package pkg;  
  
import java.io.FileInputStream;  
import java.io.IOException;  
import java.io.InputStream;  
import java.util.Properties;  
  
public class PTest {  
    public static void main(String[] args) {  
        try {  
            long start = System.currentTimeMillis();  
            InputStream is = new FileInputStream("D:\\workspace\\cdt\\2\\test\\src\\pkg\\conf.properties");  
            Properties p = new Properties();  
            p.load(is);  
            is.close();  
            System.out.println("SIZE : " + p.size());  
            System.out.println("homepage : " + p.getProperty("homepage"));  
            System.out.println("author : " + p.getProperty("author"));  
            System.out.println("school : " + p.getProperty("school"));  
            System.out.println("date : " + p.getProperty("date"));  
            long end = System.currentTimeMillis();   
            System.out.println("Cost : " + (end - start));  
        } catch (IOException ioe) {  
            ioe.printStackTrace();  
        }  
    }  
}  

--conf.properties--------------------------

# Configuration file  
homepage = http://hi.baidu.com/bbflyerwww  
author = bbflyerwww  
school = WuHan University  
date = 2006-08-02  

--------out put----------

SIZE : 4  
homepage : http://hi.baidu.com/bbflyerwww   
author : bbflyerwww  
school : WuHan University  
date : 2006-08-02  
Cost : 0