Using GeoTools, how should a shapefile be read and written such that it is as identical as possible (idempotent) to the input file, i.e. the schema, projection and any other metadata is unchanged?
My end goal is to read a shapefile and apply some minimal changes to it, but this seems like a good starting point.
I'm not necessarily interested in a working code snippet. A list of things to keep in mind when re-creating a shapefile would be more than enough.