原创 字節流轉化爲字符流

字節流轉化爲字符流   FileInputStream fileInputStream = new FileInputStream("d:/text.txt"); // 定義一個指向D:/TEXT.TXT 的字節流 InputStre

原创 HttpClient4.0.1學習參考網頁

1.    HttpClient4.0.1應用指南             http://darxin.iteye.com/blog/678547   2.    HTTPClient模擬登陸人人網        http://robbl

原创 根據Ext.form.ComboBox的選擇值來顯示或隱藏div

頁面部分代碼如下:   <form action="<c:url value=''/>" method="post"> <div id="exportBar"> <div class="para"> <div class="p

原创 List.isEmpty

jdk源碼:   /** * Returns <tt>true</tt> if this list contains no elements. * * @return <tt>true</tt> if thi

原创 CountDownLatch

http://www.javamex.com/tutorials/threads/CountDownLatch.shtml   Coordinating threads with CountDownLatch   The CountDow

原创 java 正則表達式 常見問題

public static void main(String[] args) { // (?<=A)B(?=C) 模式 // 查找"以A開始,以C結束,中間含B的字符串",然後匹配出B String input="<html

原创 Java:使用synchronized和Lock對象獲取對象鎖(轉)

轉自: http://zhangjunhd.blog.51cto.com/113473/70300     在併發環境下,解決共享資源衝突問題時,可以考慮使用鎖機制。 1.對象的鎖 所有對象都自動含有單一的鎖。 JVM負責跟蹤對象被

原创 java NIO 學習筆記2 Byte Buffers

學習資料來源:http://www.exampledepot.com/egs/java.nio/pkg.html   1. Converting Between a ByteBuffer an a Byte Array ByteBuf

原创 java final 與 線程安全(Thread-safety)

Thread-safety with the Java final keyword 來源於:http://www.javamex.com/tutorials/synchronization_final.shtml   As of Ja

原创 ExtJS常見問題問答

官方常見問題鏈接:  http://www.sencha.com/learn/Ext_FAQ_Grid        

原创 常見單詞集錦(持續更新...)

curly-braces:  大括號{},正則中常用 race condition:  競爭條件 verbatim: 逐字 linear: 線性 sequential: 順序 nested: 嵌套的 differentiated:

原创 防禦性拷貝(Defensive copying)

A mutable object is simply an object which can change its state after construction. For example, StringBuilder and Da

原创 ubuntu9.10 快速搭建簡易的ftp服務器

1. 安裝vsftpd   打開終端,輸入   sudo apt-get install vsftpd   2. 安裝完畢後會自動生成一個帳戶"ftp",/srv下也會增加一個ftp文件夾。     注意:1) 不同的ubuntu版本。

原创 java之不可變對象1(immutable objects in java)

an immutable object is an object whose state cannot be modified after it is created. 不可變對象一旦被創建就它的狀態就不能被修改。   A clas

原创 java中 Class.getResource用法

java中 Class.getResource用法