예제 #1
0
  public void setStorageType(int new_type) throws FMFileManagerException {

    try {
      this_mon.enter();

      boolean was_open = isOpen();

      if (was_open) {

        closeSupport(false);
      }

      try {
        file_access.setStorageType(new_type);

      } finally {

        if (was_open) {

          openSupport("Re-open after storage type change");
        }
      }

    } finally {

      this_mon.exit();
    }
  }
예제 #2
0
  public void ensureOpen(String reason) throws FMFileManagerException {

    try {
      this_mon.enter();

      if (isOpen()) {

        return;
      }

      openSupport(reason);

    } finally {

      this_mon.exit();
    }
  }