日期:2014-05-16  浏览次数:20624 次

Blob 存储方法

????? byte[] b = Snappy.compress((字符串).getBytes("UTF-8"));???//可选用Snappy压缩
??????InputStream is = new ByteArrayInputStream(b);//转为InputStream
??????ps.setBinaryStream(3, is);//用setBinaryStream对blob字段进行存储