On Mon, Apr 25, 2011 at 6:13 AM, Jody Garnett <[email protected]> wrote: > The work with a java Writer; use your http connection and wrap it up as a > writer on one end; and a reader on the other; and use these two methods as > shown above: > > - readFeatureCollection( reader ) > > - writeFeatureCollection( featureCollection, writer ) > > Or send a string over the wire (using whatever remoting software you are > happy with ) and use a StringWriter as shown in the test case to generate > your string on one side; and a StringReader on the other end.
To send over http you can use either commons http or use the built in Java abilities. If you go for the latter the bits of code in the resourceToStream method in this class might be of help (this is the receiving end, the other half is similar), in particular if the network is slow it shows how to use http 1.1 gzip compression to speed up the transfer: http://svn.osgeo.org/geotools/trunk/modules/unsupported/sfs/src/main/java/org/geotools/data/sfs/SFSDataStore.java Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
