NoSuchAuthorityCodeException {
// boolean isInteractiveTest = TestData.isInteractiveTest();
boolean isInteractiveTest = false;
// create a base driver
final DefaultFileDriver driver = new HDF4Driver();
File testDir = TestData.file(this,".");
final String[] files = testDir.list(new FilenameFilter(){
public boolean accept(File dir, String name) {
return name.endsWith("hdf") || name.endsWith("hdf4") ;
}});
if (files==null||files.length==0){
LOGGER.warning("Test files not found:\n Tests are skipped");
return;
}
for(String filePath:files){
final File file= new File(testDir,filePath);
final URL source = file.toURI().toURL();
if (driver.canProcess(DriverOperation.CONNECT, source,null)) {
LOGGER.info("ACCEPTED: "+source.toString());
// getting access to the file
final CoverageAccess access = driver.process(DriverOperation.CONNECT,source, null, null,null);
if (access == null)
throw new IOException("Unable to connect");
// get the names
final List<Name> names = access.getNames(null);