用一个函数试试
public String getStr(String str){
      PubClass pc = new PubClass();
      try {
           if(str==null){
             return "null";
           }
           String temp_p=str.trim();
           byte[] temp_t=temp_p.getBytes("ISO8859-1");
           String temp=new String(temp_t);
           return temp;
      }
      catch(Exception e) {
           System.err.println("PubClass+getStr:"+e.getMessage()+pc.sDBDriver+pc.sConnStr+pc.sUser+ pc.sPass);
      }
        return "null";
    }