code: public void open() {
          try {
              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("unknown");
              }
      		
          } catch(IOException ioe) {
              System.err.println("Could not initialize disk cache. Using memory cache.");
              ioe.printStackTrace();
              this.data = new RtfMemoryCache();
          }
      }
docs: Opens the RtfDocument and initializes the data cache. If the data cache is
  set to CACHE_DISK, but the cache cannot be initialized then the memory cache
  is used.