public static IDocumentTable loadDocument(DbCollection col, File docFile)
throws FileNotFoundException, XQueryException, DbException {
long fileSize = docFile.length();
IDocumentTable doc = preferedDocumentTable(col, docFile, fileSize);
DocumentTableModel dtm = new DocumentTableModel(doc);
dtm.loadDocument(new FileInputStream(docFile));
col.putDocument(new Transaction(), docFile.getName(), doc);
return doc;
}
private static IDocumentTable preferedDocumentTable(DbCollection col, File docFile, long filesize) {