byte[] content = metacontent.getContent();
String htmlContent = null;
if (domain.getValueCd().equalsIgnoreCase(LONG_TEXT)) {
bais = new ByteArrayInputStream(content);
JTidyHTMLHandler htmlHandler = new JTidyHTMLHandler();
htmlContent = htmlHandler.getContent(bais);
bais.close();
}
String uid = createUidDocument(binIdString, String.valueOf(biobjId.intValue()));
Document doc = new Document();
addFieldsToDocument(doc, binIdString, biobjId, metaName, domain, htmlContent, content);