
Java
cstur4
lllllll
展开
-
正则表达式使用
Pattern p = Pattern.compile("(?<=st)"); Matcher m = p.matcher("testtest123"); StringBuffer sb = new StringBuffer(); while(m.find()) m.appendReplacement(sb, "\r\n"); m.appendTail(sb); Syst原创 2012-03-15 14:06:11 · 680 阅读 · 2 评论 -
关于String 的正则
String 的 replace是不使用正则功能的。 replaceAll和replaceFirst会使用正则。 split(regex, n) n n=0时,匹配任意多次,但将结尾空字符串去掉 n>0时,最多匹配n-1次,也就是说数组的长度最大为n.原创 2012-03-14 23:00:47 · 416 阅读 · 0 评论 -
Oracle Blob
insert的时候插入empty_bolb(),然后用行级锁锁定行,得到blob对象(oracle.sql.Blob),获取其binaryStream,然后用blob.length()得到该对象大小(为什么不能用binaryStream的available()方法,It is never correct to use the return value of this method to alloc原创 2012-03-15 14:36:37 · 478 阅读 · 0 评论 -
Java SE
final 不能修改引用,但可以修改对象的值 final field ensure thread safe原创 2012-03-17 10:12:23 · 311 阅读 · 0 评论