可以啊,看你怎么读了。Bolb blob = rs.getBlob("...");
InputStream is = blob.getInputStream();
byte[] b = new byte[a size];
int size = is.read( b );
String xml = new String(b, 0, size);

解决方案 »

  1.   

    你说的怎么读是什么意思?我要通过xml做一个数据导入导出的模块,不需要直接访问xml文件。如果可以读出来,那写进库里也是可以实现了。方法如何实现呢?多谢了。。:)
      

  2.   

    jacky,我用你的这个方法将数据写进了xml文件,但当我再把这个数据读出来的时候,出现一个例外。
    org.jdom.JDOMException: An invalid XML character (Unicode: 0x0) was found in the element content of the document.: Error on line 4 of document : An invalid XML character (Unicode: 0x0) was found in the element content of the document.
    是什么原因呢?谢谢。。
      

  3.   

    其实,我觉得这个问题好象很难解决,
    换句话说就是要在XML的文本文件里面放二进制流。
    在java里的xml分析器,好象不能对流的操作。
    我也很关注这个问题。
      

  4.   

    看到很多都说是用base.64编码,怎么弄啊??关注。