问题出在这里rs.getBinaryStream(5)
请参考http://topic.csdn.net/t/20060316/00/4617466.html 
2楼

解决方案 »

  1.   

    应该改成按字节读取if   (rs.next())   {   
      input   =   rs.getBinaryStream(2);   
      }   
        
      ByteArrayOutputStream   boutput   =   new   ByteArrayOutputStream();   
      int   image   =   input.available();   
      byte[]   buf   =   new   byte[1024];   
      int   rc   =   0;   
      while   ((rc   =   input.read(buf))   !=   -1)   {   
      boutput.write(buf,   0,   rc);   
      }