//建立数据源链接直接sql
Connection conn = 数据源连接池;
PreparedStatement stmt = conn.prepareStatement(sql);
ResultSet rs = smt.executeQuery();
int columnCount = rs.getMetaData().getColumnCount();
while(rs.next()){
Map map = new HashMap();
for(int col= 0;col<columnCount;col++){
String coluName = rs.getMetaData().getColumnName(col +1);
Blob blob = (Blob)rs.getObject(coluName);
InputStream binaryStream = bolb.getBinaryStream();
byte[] b = new byte[binaryStream.available()];
binaryStream.read(b,0,b.length);
map.put(coluName,new String(b));
}
}