1 19 20 package org.netbeans.modules.db.explorer.driver; 21 22 import java.io.File ; 23 import java.net.URL ; 24 import org.netbeans.api.db.explorer.JDBCDriver; 25 import org.openide.filesystems.FileObject; 26 import org.openide.filesystems.FileUtil; 27 import org.openide.filesystems.URLMapper; 28 29 34 public final class JDBCDriverSupport { 35 36 private JDBCDriverSupport() { 37 } 38 39 43 public static boolean isAvailable(JDBCDriver driver) { 44 URL [] urls = driver.getURLs(); 45 for (int i = 0; i < urls.length; i++) { 46 if (URLMapper.findFileObject(urls[i]) == null) { 47 return false; 48 } 49 } 50 return true; 51 } 52 } 53 | Popular Tags |