Examples of acquireWriteFile()


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

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

        try {
            shpFiles.acquireWriteFile(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.acquireWriteFile()

       

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

        File file = shpFiles.acquireWriteFile(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.unlockWrite(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.