}
public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException {
RTFParser parser = new RTFParser(in);
try {
RTFHandler handler = new DocumentRTFHandler(doc, pos);
parser.parse(handler);
}
catch (ParseException e) {
IOException ioex = new IOException(e.toString());