使用Pattern及Matcher判斷字串符不符合各項條件
import java.util.regex.Matcher;
import java.util.regex.Pattern;;
//是否都為數字
目前分類:java學習心得 (4)
- Oct 30 Tue 2007 17:03
正則表示式練習
- Oct 29 Mon 2007 10:02
抓取網站資料(Parser)
因某人需要國家國旗的資料庫,所以寫了一支簡單的parser,除了PostMethod之外,還可以使用GetMethod,曾遇到過PostMethod抓不了,改用GetMethod就可以
因為只有要抓一次而已,所以寫的很簡略,沒有做太多連線的判斷
需commons-codes.jar、commons-httpclient.jar、commons-io.jar、commons-logging.jar、commons-lang.jar
- Oct 23 Tue 2007 16:16
檔案下載 - 將二進位資料傳至瀏覽器下載
檔案資料以二進位型態存至資料庫中,載時,將二進位資料送至瀏覽器下載
class須繼承HttpServlet
String encodedFilename = "test.txt"; //下載的檔名
response.addHeader(
"Content-Disposition",