Enum RealmFileException.Kind

    • Enum Constant Detail

      • ACCESS_ERROR

        public static final RealmFileException.Kind ACCESS_ERROR
        Thrown for any I/O related exception scenarios when a Realm is opened.
      • BAD_HISTORY

        public static final RealmFileException.Kind BAD_HISTORY
        Thrown if the history type of the on-disk Realm is unexpected or incompatible.
      • PERMISSION_DENIED

        public static final RealmFileException.Kind PERMISSION_DENIED
        Thrown if the user does not have permission to open or create the specified file in the specified access mode when the Realm is opened.
      • EXISTS

        public static final RealmFileException.Kind EXISTS
        Thrown if the destination file exists but it is not supposed to.
      • INCOMPATIBLE_LOCK_FILE

        public static final RealmFileException.Kind INCOMPATIBLE_LOCK_FILE
        Thrown if the database file is currently open in another process which cannot share with the current process due to an architecture mismatch.
      • FORMAT_UPGRADE_REQUIRED

        public static final RealmFileException.Kind FORMAT_UPGRADE_REQUIRED
        Thrown if the file needs to be upgraded to a new format, but upgrades have been explicitly disabled.
      • INCOMPATIBLE_SYNC_FILE

        public static final RealmFileException.Kind INCOMPATIBLE_SYNC_FILE
        Thrown if an attempt was made to open an Realm file created with Realm Object Server 1.*, which is not compatible with Realm Object Server 2.*. This exception should automatically be handled by Realm.
    • Method Detail

      • values

        public static RealmFileException.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RealmFileException.Kind c : RealmFileException.Kind.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RealmFileException.Kind valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null