Base64编码处理图片blob格式

Blob picture = cd.getCoverImage();
   if(null!=picture){
   try {
    long size = picture.length();   
    byte[] bs = picture.getBytes(1, (int) size);
    
    cover.addContent(Base64.encodeBytes(bs));
   } catch (SQLException e) {
    e.printStackTrace();
   }
   }

 

你可能感兴趣的:(小技巧)