switch(this.documentSettings.getDataCacheStyle()) {
case RtfDataCache.CACHE_MEMORY_EFFICIENT:
this.data = new RtfEfficientMemoryCache();
break;
case RtfDataCache.CACHE_MEMORY:
this.data = new RtfMemoryCache();
break;
case RtfDataCache.CACHE_DISK:
this.data = new RtfDiskCache();
break;
default:
throw new RuntimeException(MessageLocalization.getComposedMessage("unknown"));
}
} catch(IOException ioe) {
System.err.println("Could not initialize disk cache. Using memory cache.");
ioe.printStackTrace();
this.data = new RtfMemoryCache();
}
}