# Class Driver

Object
Driver

public final class Driver extends Object
Information about a GDAL driver.

Since:
  1.5

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getFileSuffixes()`
  Returns the file extensions handled by the driver.
  `String`
  `getIdentifier()`
  Returns the short name of the driver.
  `String`
  `getMetadataItem(String name, String domain)`
  Fetches a single metadata item.
  `String`
  `getMIMEType()`
  Returns the MIME type handled by the driver.
  `String`
  `getName()`
  Returns the long name of the driver.
  `boolean`
  `supportRasters()`
  Returns whether the driver has raster capability.
  `String`
  `toString()`
  Returns a string representation of this driver for debugging purposes.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### getName

    public String getName() throws DataStoreException
    Returns the long name of the driver. For the GeoTIFF driver, this is `"GeoTIFF"`.
    Returns:
      the driver long name, or `null`.
    Throws:
      `DataStoreException` - if an error occurred while invoking a GDAL function.

  - ### getIdentifier

    public String getIdentifier() throws DataStoreException
    Returns the short name of the driver. For the GeoTIFF driver, this is `"GTiff"`. This is the name used by GDAL for identifying a driver on the command-line.
    Returns:
      the driver short name, or `null`.
    Throws:
      `DataStoreException` - if an error occurred while invoking a GDAL function.
    See Also:
      - `GDALStoreProvider​.DRIVERS_OPTION_KEY`

  - ### getMIMEType

    public String getMIMEType() throws DataStoreException
    Returns the MIME type handled by the driver.
    Returns:
      the MIME type handled by the driver, or `null` if unspecified.
    Throws:
      `DataStoreException` - if an error occurred while invoking a GDAL function.

  - ### getFileSuffixes

    public String[] getFileSuffixes() throws DataStoreException
    Returns the file extensions handled by the driver.
    Returns:
      the file extensions handled by the driver, or an empty array if none.
    Throws:
      `DataStoreException` - if an error occurred while invoking a GDAL function.
    See Also:
      - `ImageReaderWriterSpi()`

  - ### supportRasters

    public boolean supportRasters() throws DataStoreException
    Returns whether the driver has raster capability.
    Returns:
      whether the driver has raster capability.
    Throws:
      `DataStoreException` - if an error occurred while invoking a GDAL function.

  - ### getMetadataItem

    public String getMetadataItem(String name, String domain) throws DataStoreException
    Fetches a single metadata item. The following table lists some metadata:

    Some metadata keys
    Key | Description
    --- | ---
    `"DMD_MIMETYPE"` | MIME type handled by the driver.
    `"DMD_EXTENSIONS"` | space separated list of file extensions handled by the driver.
    `"DCAP_RASTER"` | Whether the driver has raster capability.

    Parameters:
      `name` - the key for the metadata item to fetch.
      `domain` - the domain to fetch for, or `null` for the default domain.
    Returns:
      the metadata item value, or `null` if none.
    Throws:
      `DataStoreException` - if an error occurred while invoking a GDAL function.

  - ### toString

    public String toString()
    Returns a string representation of this driver for debugging purposes.
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation of this driver.