hello everybody, i want to read the text from the .rtf file. i m using " javax.swing.text.rtf.RTFEditorKit"; i used the following code for that. But for some .rtf files it worked finly but for some .rtf files it throws the following Exception. "java.io.IOException: Too many close-groups in RTF text" while reding the .rtf file means at line " rtfKit.read(din,styledDoc,0);" in the following code. can anybody tell me where is the problem & solution for it.