faulware的博客
faulware · 共 3 篇文章
java读写clob
从数据库中读取clob值 public String clob2String(Clob clob) { StringBuffer retValue=new StringBuffer(); if(clob!=null) { try { Reader reader=clob.getCharacterStream(); BufferedReader in=new BufferedReader(reader); String s=in.readLine(); while(s!=null) { retValue.append(s); s=in.readLine(); } } catch (SQLExc…
2011-09-06 19:26 · java学习之路 · 评论(0)
一台电脑安装多个tomcat
windows下面,一台电脑安装多个tomcat。我安装了2个tomcat 6.0,下载地址http://tomcat.apache.org/download-60.cgi。选择6.0.32目录下的binary distributions下的core 我电脑是32未windows系统,选择了32位windows zip文件。 1).解压缩到2个目录,对于每个tomcat 6.0目录,打开apache-tomcat-6.0.32\bin下面的catalina.bat和startup.bat在rem Guess CATALINA_HOME if not defined之后加上set CATALI…
2011-08-09 23:02 · java学习之路 · 评论(1)
对有序list分组
近来要对一个有序的list进行分组,由于我是初学者,以前没有编程经验,所以出了许多bug。下面分享一下。 List里面放着author,author有属性id、name和writeCount三个属性,分别表示作者id、昵称和编辑文章数量。对于按照id排序的list,统计每个作者编辑了多少文章。 public class author { private int id; private String name; private int writeCount; //set get 方法 } List的初始值是:original list author id=1 author name=1liga…
2011-08-06 14:41 · java学习之路 · 评论(0)