找到了方法了。。。:lol 谢谢大家
[code]]InputStream photoStrean = new FileInputStream(file);
byte[] bytes = new byte[photoStrean.available()];
photoStrean.read(bytes);
photoStrean.close();
BASE64Encoder encoder = new BASE64Encoder();
HashMap hash = new HashMap();
hash.put("name", "hello with JPG!!");
hash.put("logo", encoder.encode(bytes));
Object[] ids = new Object[]{50};
Object[] params = new Object[] {"mda",id,"admin", "res.partner", "write",ids, hash};
Object result = client_obj.execute("execute", params);
}
catch(Exception e){
System.out.println("插入图片出错");
}[/code]
[[i] 本帖最后由 popkar77 于 2009-6-11 15:19 编辑 [/i]]