loci.formats.services

## Class MDBServiceImpl

- java.lang.Object
- - loci.common.services.AbstractService
  - - loci.formats.services.MDBServiceImpl

- All Implemented Interfaces:
    loci.common.services.Service, MDBService

      public class MDBServiceImpl
      extends loci.common.services.AbstractService
      implements MDBService

  Implementation of `MDBService` for parsing MDB database files.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.Vector<mdbtools.libmdb.Holder>` | `boundValues`
    `private mdbtools.libmdb.MdbHandle` | `mdb`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MDBServiceImpl()` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the currently initialized file.
    `private boolean` | `fetchRow(mdbtools.libmdb.MdbTableDef table)` Fetches the next row from the table, ignoring potential parsing exceptions.
    `void` | `initialize(java.lang.String filename)` Prepare the given .mdb file for reading.
    `java.util.Vector<java.util.Vector<java.lang.String[]>>` | `parseDatabase()` Read all tables from a pre-initialized .mdb files.
    `java.util.Vector<java.lang.String[]>` | `parseTable(java.lang.String name)` Read named table from a pre-initialized .mdb files.

    - ### Methods inherited from class loci.common.services.AbstractService

      `checkClassDependency`

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

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

- - ### Field Detail

    - #### mdb

          private mdbtools.libmdb.MdbHandle mdb

    - #### boundValues

          private java.util.Vector<mdbtools.libmdb.Holder> boundValues

  - ### Constructor Detail

    - #### MDBServiceImpl

          public MDBServiceImpl()

      Default constructor.

  - ### Method Detail

    - #### initialize

          public void initialize(java.lang.String filename)
                          throws java.io.IOException

      Description copied from interface: `MDBService`
      Prepare the given .mdb file for reading. This method must be called before `MDBService.parseDatabase()`.
      Specified by:
        `initialize` in interface `MDBService`
      Throws:
        `java.io.IOException` - if a problem occurs when opening the file

    - #### parseDatabase

          public java.util.Vector<java.util.Vector<java.lang.String[]>> parseDatabase()
                                                                               throws java.io.IOException

      Description copied from interface: `MDBService`
      Read all tables from a pre-initialized .mdb files. Each Vector in the outer Vector represents a table; each String[] in a table represents a row, and each element of the String[] represents the value of a particular column within the row. The first row in each table contains the names for each column. The first entry in the column name row is the name of the table. `MDBService.initialize(String)` must be called before calling parseDatabase().
      Specified by:
        `parseDatabase` in interface `MDBService`
      Throws:
        `java.io.IOException` - if there is a problem reading the table data

    - #### parseTable

          public java.util.Vector<java.lang.String[]> parseTable(java.lang.String name)
                                                          throws java.io.IOException

      Description copied from interface: `MDBService`
      Read named table from a pre-initialized .mdb files. Each String[] in a table represents a row, and each element of the String[] represents the value of a particular column within the row. The first row in the table contains the names for each column. `MDBService.initialize(String)` must be called before calling parseTable.
      Specified by:
        `parseTable` in interface `MDBService`
      Parameters:
        `name` - table name
      Returns:
        table data or null if the named table does not exist
      Throws:
        `java.io.IOException` - if there is a problem reading the table data

    - #### close

          public void close()

      Description copied from interface: `MDBService`
      Close the currently initialized file.
      Specified by:
        `close` in interface `MDBService`

    - #### fetchRow

          private boolean fetchRow(mdbtools.libmdb.MdbTableDef table)

      Fetches the next row from the table, ignoring potential parsing exceptions.
      Parameters:
        `table` - Table to fetch the next available row from.
      Returns:
        `true` if there are further rows to fetch. `false` if there are no further rows to fetch or an exception is thrown while parsing the row.

Copyright © 2026 Open Microscopy Environment