loci.formats

## Class UpgradeChecker

- java.lang.Object
- - loci.formats.UpgradeChecker

-     public class UpgradeChecker
      extends java.lang.Object

  Class that allows checking for new versions of Bio-Formats, as well as updating to the latest stable, daily, or trunk version.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static int` | `CHUNK_SIZE` Number of bytes to read from the CI server at a time.
    `static java.lang.String` | `CI_SERVER` Location of the OME continuous integration server.
    `static java.lang.String` | `DAILY_BUILD` Location of the JAR artifacts for Bio-Formats' daily build.
    `static java.lang.String` | `DEFAULT_CALLER` Value of "bioformats.caller" for Bio-Formats utilities.
    `static java.lang.String[]` | `INDIVIDUAL_JARS` Names of the individual JARs.
    `private static org.slf4j.Logger` | `LOGGER`
    `static java.lang.String` | `OLD_TOOLS` Deprecated. Removed in Bio-Formats 6.9.0
    `static java.lang.String` | `OME_TOOLS` Name of the OME tools JAR.
    `static java.lang.String` | `REGISTRY` Location of the OME registry.
    `static java.lang.String` | `REGISTRY_IMAGEJ` Registry ID identifying usage of Bio-Formats in ImageJ.
    `static java.lang.String` | `REGISTRY_LIBRARY` Registry ID identifying usage of Bio-Formats as a library in general.
    `private static java.lang.String[]` | `REGISTRY_PROPERTIES` Properties that are sent to the OME registry.
    `static java.lang.String` | `STABLE_BUILD` Location of the JAR artifacts for the stable releases.
    `static java.lang.String` | `STABLE_VERSION` Deprecated. As of release 6.6.0
    `static java.lang.String` | `TOOLS` Name of the ueber tools JAR.
    `static java.lang.String` | `TRUNK_BUILD` Location of the JAR artifacts for Bio-Formats' trunk build.
    `private static java.lang.String` | `UPGRADE_CHECK_ALLOWED_PROPERTY` System property indicating whether the upgrade check is ever allowed.
    `private static java.lang.String` | `UPGRADE_CHECK_PROPERTY` System property to set once the upgrade check is performed.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UpgradeChecker()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `alreadyChecked()` Return true if an upgrade check has already been performed in this JVM session.
    `boolean` | `canDoUpgradeCheck()` Return whether or not we are ever allowed to perform an upgrade check.
    `boolean` | `install(java.lang.String urlPath, java.lang.String downloadPath)` Download and install a JAR file from the given URL.
    `boolean` | `installIndividualJars(java.lang.String urlDir, java.lang.String downloadDir)` Download and install all of the individual JAR files into the given directory.
    `boolean` | `newVersionAvailable(java.lang.String caller)` Contact the OME registry and return true if a new version is available.
    `boolean` | `newVersionAvailable(java.lang.String registryID, java.lang.String caller)` Contact the OME registry and return true if a new version is available.
    `void` | `setCanDoUpgradeCheck(boolean canDo)` Set whether or not we are ever allowed to perform an upgrade check.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### REGISTRY_IMAGEJ

          public static final java.lang.String REGISTRY_IMAGEJ

      Registry ID identifying usage of Bio-Formats in ImageJ.
      See Also:
        Constant Field Values

    - #### REGISTRY_LIBRARY

          public static final java.lang.String REGISTRY_LIBRARY

      Registry ID identifying usage of Bio-Formats as a library in general.
      See Also:
        Constant Field Values

    - #### STABLE_VERSION

          public static final java.lang.String STABLE_VERSION

      Deprecated. As of release 6.6.0
      See Also:
        Constant Field Values

    - #### CI_SERVER

          public static final java.lang.String CI_SERVER

      Location of the OME continuous integration server.
      See Also:
        Constant Field Values

    - #### TRUNK_BUILD

          public static final java.lang.String TRUNK_BUILD

      Location of the JAR artifacts for Bio-Formats' trunk build.
      See Also:
        Constant Field Values

    - #### DAILY_BUILD

          public static final java.lang.String DAILY_BUILD

      Location of the JAR artifacts for Bio-Formats' daily build.
      See Also:
        Constant Field Values

    - #### STABLE_BUILD

          public static final java.lang.String STABLE_BUILD

      Location of the JAR artifacts for the stable releases.
      See Also:
        Constant Field Values

    - #### TOOLS

          public static final java.lang.String TOOLS

      Name of the ueber tools JAR.
      See Also:
        Constant Field Values

    - #### OLD_TOOLS

          public static final java.lang.String OLD_TOOLS

      Deprecated. Removed in Bio-Formats 6.9.0
      Name of the previous versions' tools JAR.
      See Also:
        Constant Field Values

    - #### OME_TOOLS

          public static final java.lang.String OME_TOOLS

      Name of the OME tools JAR.
      See Also:
        Constant Field Values

    - #### INDIVIDUAL_JARS

          public static final java.lang.String[] INDIVIDUAL_JARS

      Names of the individual JARs.

    - #### REGISTRY

          public static final java.lang.String REGISTRY

      Location of the OME registry.
      See Also:
        Constant Field Values

    - #### DEFAULT_CALLER

          public static final java.lang.String DEFAULT_CALLER

      Value of "bioformats.caller" for Bio-Formats utilities.
      See Also:
        Constant Field Values

    - #### REGISTRY_PROPERTIES

          private static final java.lang.String[] REGISTRY_PROPERTIES

      Properties that are sent to the OME registry.

    - #### UPGRADE_CHECK_PROPERTY

          private static final java.lang.String UPGRADE_CHECK_PROPERTY

      System property to set once the upgrade check is performed.
      See Also:
        Constant Field Values

    - #### UPGRADE_CHECK_ALLOWED_PROPERTY

          private static final java.lang.String UPGRADE_CHECK_ALLOWED_PROPERTY

      System property indicating whether the upgrade check is ever allowed.
      See Also:
        Constant Field Values

    - #### CHUNK_SIZE

          private static final int CHUNK_SIZE

      Number of bytes to read from the CI server at a time.
      See Also:
        Constant Field Values

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

  - ### Constructor Detail

    - #### UpgradeChecker

          public UpgradeChecker()

  - ### Method Detail

    - #### alreadyChecked

          public boolean alreadyChecked()

      Return true if an upgrade check has already been performed in this JVM session.

    - #### canDoUpgradeCheck

          public boolean canDoUpgradeCheck()

      Return whether or not we are ever allowed to perform an upgrade check.

    - #### setCanDoUpgradeCheck

          public void setCanDoUpgradeCheck(boolean canDo)

      Set whether or not we are ever allowed to perform an upgrade check.

    - #### newVersionAvailable

          public boolean newVersionAvailable(java.lang.String caller)

      Contact the OME registry and return true if a new version is available. OMERO.registry will identify this as a generic library usage of Bio-Formats (i.e. not associated with a specific client application).
      Parameters:
        `caller` - name of the calling application, e.g. "MATLAB"

    - #### newVersionAvailable

          public boolean newVersionAvailable(java.lang.String registryID,
                                             java.lang.String caller)

      Contact the OME registry and return true if a new version is available.
      Parameters:
        `registryID` - how the application identifies itself to OMERO.registry
        `caller` - name of the calling application, e.g. "MATLAB"
      See Also:
        `REGISTRY_IMAGEJ`, `REGISTRY_LIBRARY`

    - #### installIndividualJars

          public boolean installIndividualJars(java.lang.String urlDir,
                                               java.lang.String downloadDir)

      Download and install all of the individual JAR files into the given directory.
      Parameters:
        `urlDir` - the location from which to download the JAR files
        `downloadDir` - the directory into which to save the JAR files
      Returns:
        true if installation was successfull
      See Also:
        `install(String, String)`

    - #### install

          public boolean install(java.lang.String urlPath,
                                 java.lang.String downloadPath)

      Download and install a JAR file from the given URL.
      Parameters:
        `urlPath` - the location from which to download the JAR
        `downloadPath` - the location in which to write the JAR; if this location already exists, it will be overwritten
      Returns:
        true if installation was successful

Copyright © 2026 Open Microscopy Environment