mk5878125
mk5878125
2017-10-24 03:57

使用java将kingbase的blob类型转换为String

10
  • java

存在kingbase数据库里的是PDF文件,查询出来的blob类型为com.kingbase.jdbc3.Jdbc3Blob,如何转换成String格式?使用
byte[] b = new byte[1024 * 8];
int i = 0;
while ((i = is.read(b)) != -1) {
sb.append(new String(b, 0, i));
}
时报错java.io.IOException: Transaction exception during operate large object
at com.kingbase.largeobject.BlobInputStream.read(Unknown Source)

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐