public DataHandler getDataHandler(String contentType) throws MessagingException {
if(log.isDebugEnabled()){
log.debug("getDataHandler()");
log.debug("accessCount =" +accessCount);
}
CachedFileDataSource dataSource = new CachedFileDataSource(file);
dataSource.setContentType(contentType);
accessCount++;
setChanged();
notifyObservers();
DataHandler dataHandler = new DataHandler(dataSource);
return new DataHandlerExtImpl(dataHandler, manager);