public static URL toURL(String systemID) { if (StringUtil.isWhitespace(systemID)) return null; systemID = systemID.trim(); try { return new URL(systemID); } catch (MalformedURLException ex) { return FileUtil.toURL(new File(systemID)); } }