// creates the shapefile
ShapefileDataStoreFactory dataStoreFactory = new ShapefileDataStoreFactory();
Map<String, Serializable> params = new HashMap<String, Serializable>();
params.put("url", URLUtils.fileToURL(file)); //$NON-NLS-1$
params.put("create spatial index", Boolean.TRUE); //$NON-NLS-1$
ShapefileDataStore ds = (ShapefileDataStore) dataStoreFactory.createDataStore(params);
ds.createSchema(type);
SimpleFeatureStore featureSource = (SimpleFeatureStore) ds.getFeatureSource();
List<FeatureId> ids = featureSource.addFeatures(fc);
return ids.size() >= 0;