/**
*生成随机的中文组合
* @param len 需要生成的文字长度
* @return
*/
public static String getRandomZh(int len) {
String ret = ""
for (int i = 0
String str = null
int hightPos, lowPos
Random random = new Random()
hightPos = (176 + Math.abs(random.nextInt(39)))
lowPos = (161 + Math.abs(random.nextInt(93)))
byte[] b = new byte[2]
b[0] = (new Integer(hightPos).byteValue())
b[1] = (new Integer(lowPos).byteValue())
try {
str = new String(b, "GBK")
} catch (UnsupportedEncodingException ex) {
ex.printStackTrace()
}
ret += str
}
return ret
}