Examples of acquireReadFile()


Examples of org.geotools.data.shapefile.files.ShpFiles.acquireReadFile()

    @Test
    public void testAcquireReadFile() throws Throwable {
        ShpFiles shpFiles = new ShpFiles("http://somefile.com/shp.shp");

        try{
            shpFiles.acquireReadFile(DBF, this);
            fail("Not a file should send exception");
        }catch(IllegalStateException e ){
            // good
        }
       
View Full Code Here

Examples of org.geotools.data.shapefile.files.ShpFiles.acquireReadFile()

       

        String path = "somefile.shp";
        shpFiles = new ShpFiles( new File( path ));

        File file = shpFiles.acquireReadFile(SHP, this);
        // under windows the two paths can be just different in terms of case..
        assertEquals( new File(path).getCanonicalPath().toLowerCase(), file.getPath().toLowerCase());
        assertEquals(1, shpFiles.numberOfLocks());
       
        shpFiles.unlockRead(file, this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.