JAVAÇå³ýhtml¸ñʽÕýÔò±í´ïʽ
public static String splitAndFilterString(String input, int length) {
if (input == null || input.trim().equals("")) {
return "";
}
// È¥µôËùÓÐhtmlÔªËØ,
String str = input.replaceAll("\\&[a-zA-Z]{1,10};", "").replaceAll(
"<[^>]*>", "");
str = str.replaceAll("[(/>)<]", "");
int len = str.length();
if (len <= length) {
return str;
} else {
str = str.substring(0, length);
str += "......";
}
return str;
}
Ïà¹ØÎĵµ£º
<form action="#" method="get">ÕâÀïÊÇ±íµ¥µÄÄÚÈÝ</form>
<form action="#" method="post">ÕâÀïÊÇ±íµ¥µÄÄÚÈÝ</form>
ÊôÐÔ"action",ÀïÃæÉèÖõÄÊÇ±íµ¥Ìá½»µÄ·¾¶.Ò»¸ö¶ÔÏó,°×»°ÎĵĽâÊÍ:±íµ¥½»¸øÁËË.
ÊôÐÔ"method",ÀïÃæÉèÖõÄÊÂ±íµ¥Ìá½»µÄ·½Ê½,Ò»ÖÖ·½·¨,°×»°ÎĽâÊÍ:ÒªÔõÑùÌá½»Õâ¸ö±íµ¥,ÊÇÎÒÖ±½Óà ......
java.util
Àà Random
java.lang.Object
java.util.Random
ËùÓÐÒÑʵÏֵĽӿڣº
Serializable
Ö±½ÓÒÑÖª×ÓÀࣺ
SecureRandom
public class Random
extends Object
implements Serializable
´ËÀàµÄʵÀýÓÃÓÚÉú³ÉαËæ»úÊýÁ÷¡£´ËÀàʹÓà 48 λµÄÖÖ×Ó£¬Ê¹ÓÃÏßÐÔͬÓ๫ʽ¶ÔÆä½øÐÐÐ޸ģ¨Çë²ÎÔÄ Donald Knuth µÄ ......
package com.qiao.java;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iter ......
1. ʲôÊÇSerialization?
´®Ðл¯(Serialization)ÊǼÆËã»ú¿ÆѧÖеÄÒ»¸ö¸ÅÄËüÊÇÖ¸½«¶ÔÏó´æ´¢µ½½éÖÊ£¨ÈçÎļþ¡¢ÄÚÔÚ»º³åÇøµÈ£©ÖлòÊÇÒÔ¶þ½øÖÆ·½Ê½Í¨¹ýÍøÂç´«Êä¡£Ö®ºó ¿ÉÒÔͨ¹ý·´´®Ðл¯´ÓÕâЩÁ¬ÐøµÄλÊý¾ÝÖØй¹½¨Ò»¸öÓëÔʼ¶ÔÏó״̬ÏàͬµÄ¶ÔÏó£¬Òò´ËÔÚÌض¨Çé¿öÏÂÒ²¿ÉÒÔ˵Êǵõ½Ò»¸ö¸±±¾£¬µ«²¢²»ÊÇËùÓÐÇé¿ö¶¼ÕâÑù¡£
JavaÓÐS ......