Code example for File

Methods: canReadexistsgetNamegetPath

0
        assertEquals("file", url.getProtocol());
 
        final String path = URLDecoder.decode(url.getPath(), "UTF-8");
        assertTrue(path.endsWith("test.nc"));
 
        final File file = new File(path);
        assertEquals(file.getName(), "test.nc");
        assertTrue(file.exists());
        assertTrue(file.canRead());
 
        final ProductReader reader = new CfNetCdfReaderPlugIn().createReaderInstance();
        final Product product = reader.readProductNodes(file.getPath(), null);
        assertNotNull(product);
 
        testStartTime(product);
        testEndTime(product);
    } 
 
    private void testStartTime(final Product product) {
        final ProductData.UTC utc = product.getStartTime();