new InputSource(new InputStreamReader(is, charset)), false);
is.close();
} else {
final FileInputStream is = new FileInputStream(tempFile);
collection.addBinaryResource(transaction, broker, docUri,
is, contentType, tempFile.length());
is.close();
}
transact.commit(transaction);