public List getSMList()
throws Exception
{
List smList = new ArrayList();
begin();
try
{
String sql = " select DOCID,REGDELIVER,MOBILES,CONTENT,SENDTIME from HNSLT_SMS_MT ";
ResultSet rs = this.stmt.executeQuery(sql);
while (rs.next())
{
String[] tmp = new String[6];
tmp[0] = rs.getString(1);
tmp[1] = rs.getInt(2);
tmp[3] = rs.getString(4);
tmp[4] = rs.getString(5);
String tmpcontent = "";
Clob clob = rs.getClob("MOBILES");
Reader inStream = clob.getCharacterStream();
BufferedReader br = new BufferedReader(inStream);
String str = br.readLine();
while (str != null) {
tmpcontent = tmpcontent + str;
str = br.readLine();
}
tmp[2] = tmpcontent;
smList.add(tmp);
inStream.close();
}
rs.close();
}
catch (Exception e) {
e.printStackTrace();
} finally {
end();
}
return smList;
}