Hi,
I am looking at writing the BLOB from database which is an rtf data to write to RTF file.
I am trying to use the RTFEditorKit for the same and was struck with the write API it provides.
write API takes the outstream and Document, all I have is Inputstream or bytestream from database - how do I convert the stream data to a Java Document object.
FileOutputStream outputStream = new FileOutputStream("C:\\blobfile.rtf");
RTFEditorKit rtf = new RTFEditorKit();
Document doc = rtf.createDefaultDocument();
rtf.write(outputStream, lob.getBinaryStream(0, lob.length()), 0, doc.getLength());
Problem is it's writing the raw data which is with all the tags, It's not recognizing as rtf format data, when i open the file in RTF editor i see all the tags and content instead of just content, any way i can eliminate?