By default, GeoTools (20.2) tries to convert the graphic objects into shapefiles on the disk. We want to skip this step and have GeoTools keep the file contents in memory (and return it as a byte array or other memory object) so we can stream it elsewhere. We have security requirements that prevent us from accessing the filesystem so all operations must be done in memory. This lack of functionality could preclude us from using GeoTools if it cannot accomplish this.
It seems easy enough to do this using Java streams. using streams to write the data into any kind of memory or file buffer. I need to understand if this was (or why it was not) done as it appears to be a simple "design for but not with" convention at its simplest.
Is there a need to remain backward compatible with older versions of Java that don't support some of these functions and what is the hard limit on Java versions like Java 6?
FeatureCollection
which is designed for that