private static void addContent(StringBuffer content, Document doc, InputStream is) throws IOException {
FieldUtil.setMimeType(doc, "application/msword");
WordExtractor extractor = new WordExtractor();
String contents;
try {
contents = extractor.extractText(is);
if(content!=null)content.append(contents);
} catch (Exception e) {
if(e instanceof IOException) throw (IOException)e;
throw new IOException(e.getMessage());
}