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

推荐订阅源

S
Securelist
L
LangChain Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
月光博客
月光博客
S
Schneier on Security
Simon Willison's Weblog
Simon Willison's Weblog
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
美团技术团队
S
Security @ Cisco Blogs
人人都是产品经理
人人都是产品经理
L
LINUX DO - 热门话题
S
SegmentFault 最新的问题
D
DataBreaches.Net
C
CXSECURITY Database RSS Feed - CXSecurity.com
Microsoft Security Blog
Microsoft Security Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News | PayPal Newsroom
W
WeLiveSecurity
F
Fortinet All Blogs
The Hacker News
The Hacker News
The Register - Security
The Register - Security
P
Palo Alto Networks Blog
Engineering at Meta
Engineering at Meta
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
G
GRAHAM CLULEY
博客园 - 聂微东
P
Privacy International News Feed
P
Privacy & Cybersecurity Law Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
G
Google Developers Blog
T
Tailwind CSS Blog
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
T
Tenable Blog
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
云风的 BLOG
云风的 BLOG
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
B
Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Hugging Face - Blog
Hugging Face - Blog
T
Threatpost

博客园 - 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