docs: public synchronized void close(boolean write) {
  
          if (dataFile == null) {
              return;
          }
  
          try {
              cache.saveAll();
  
              boolean empty = (dataFile.length() <= NL.length());
  
              dataFile.close();
  
              dataFile = null;
  
              if (empty && !cacheReadonly) {
                  FileUtil.getDefaultInstance().delete(fileName);
              }
          } catch (Exception e) {
              throw Error.error(ErrorCode.FILE_IO_ERROR,
                                ErrorCode.M_TextCache_closing_file_error,
                                new Object[] {
                  fileName, e
              });
          }
      }