code: public static boolean importShapefile( ASpatialDb db, File shapeFile, String tableName, int limit, IHMProgressMonitor pm )
              throws Exception {
          FileDataStore store = FileDataStoreFinder.getDataStore(shapeFile);
          SimpleFeatureSource featureSource = store.getFeatureSource();
          SimpleFeatureCollection features = featureSource.getFeatures();
  
          return importFeatureCollection(db, features, tableName, limit, pm);
  
      }
docs: Import a shapefile into a table.
  
  @param db the database to use.
  @param shapeFile the shapefile to import.
  @param tableName the name of the table to import to.
  @param limit if > 0, a limit to the imported features is applied.
  @param pm the progress monitor.
  @return <code>false</code>, is an error occurred.
  @throws Exception