InputStream rtfInputStream = null;
Reader rtfReader = getRTFReader(request);
if (rtfReader == null) {
rtfInputStream = getRTFInputStream(request);
if (rtfInputStream == null)
throw new RTFTemplateException("Impossible to launch RTF edition. Method RTFTemplateServlet.getRTFReader or RTFTemplateServlet.getRTFInputStream must not return null.");
}
if(rtfReader != null)
rtfTemplate.setTemplate(rtfReader);
else
rtfTemplate.setTemplate(rtfInputStream);