易截截图软件、单文件、免安装、纯绿色、仅160KB

java过滤特殊字符

public   static   String StringFilter(String   str)   throws  
PatternSyntaxException   {
          // 只允许字母和数字       
          // String   regEx  =  "[^a-zA-Z0-9]";                     

             // 清除掉所有特殊字符  
    String
regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|
{}【】‘;:”“’。,、?]";  
    Pattern   p   =   Pattern.compile(regEx);     
    Matcher   m   =   p.matcher(str);     
    return   m.replaceAll("").trim();     
    }

http://sunlianwei.javaeye.com/blog/363759


相关文档:

JAVA 爬网页用 例如:http://www.126.com

/*
Function name: myGetHttpFile2
Description: 爬网页用
Input: URL 例如:http://www.126.com
Output: 字符串,网页的HTML
*/
public String myGetHttpFile2(String url){
String authentication=null;
ArrayList al=new ArrayList();
String PageURL = url;
......

java 缩略图 实现

import  java.awt.image. * ;
import  com.sun.image.codec.jpeg. * ;   
 public class poiReadDoc {
 Image img = null;
 int width = 0,height =0;
 String destFile = "";
 public void readImg(String fileName) throws IOException{
  File _fil ......

Java中 ArrayList、Vector和LinkedList 的使用


ArrayList是最常用的List实现类,内部是通过数组实现的,它允许对元素进行快速随机访问。数组的缺点是每个元素之间不能含有“空隙”,当数组大小不满足时需要增加存储能力,就要将已有数组数据复制到新的存储空间中。当从ArrayList的中间位置插入或者删除元素时,需要对数组进行复制、移动,代价比较高。因此, ......

java格式化日期时间的函数

Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
System.out.println(sdf.format(date));
SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
System.out.println(sdf2.format(date));
Calendar c = Calendar.getInstance();
System.out.println(c.get(C ......

关于java的++和

public class JavaPlus {

public static void main(String[] args) {
int x = 5;
x++;// x = x + 1;//后加加
System.out.println(x);
x--;// x = x - 1;//后减减
System.out.println(x);
++x;// x = x + 1;//前加加
Sys ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号