//TODO use a stream to consume lower memory for large files
os.write(bean.getBinaryContent());
os.close();
}
} catch (Exception e) {
throw new CRException("Cannot update the index.", e);
}
} else if (!ignorePubDir) {
//it would just make no sense to check for check for folders existence if the pub_dir attribute is ignored
String publicationDirectory = bean.getString("pub_dir");