Hi list,

I have an unsigned applet application and was trying to read shapefiles 
directly from the client. I'm following this tutorial 
http://docs.oracle.com/javase/tutorial/deployment/doingMoreWithRIA/usingJNLPAPI.html
 
to access the shapefiles, however the FileContent class only exposes the 
file as an InputStream.

On the other hand I'm relying on this code snippet to read the shapefile 
contents:

         Map connect = new HashMap();
         connect.put("url", file.toURI().toURL());

         DataStore dataStore = DataStoreFinder.getDataStore(connect);
         String[] typeNames = dataStore.getTypeNames();
         String typeName = typeNames[0];

         FeatureSource featureSource = dataStore.getFeatureSource(typeName);
         FeatureCollection collection = featureSource.getFeatures();

I've searched around but without success. Could anyone kindly give me a 
pointer? Is there a way to access shapefiles from an unsigned applet? 
Thanks!

Cheers,
Nhan

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to