The DataStore interface is general to all of the implemented DataStores. The following document describes the use of a DB2DataStore and is based on the How to use a PostGISDataStore.
These docs have moved to the user guide:
Creating a DB2DataStore
The following code shows how to use the DataStoreFinder to create a DB2DataStore.
Once the DB2DataStore is created, you can use it like any other DataStore.