boolean (String inputString) { try { URL url = new URL(inputString); return StringUtil.isNotEmpty(url.getHost()) || "file".equals(url.getProtocol()); } catch (MalformedURLException e) { return false; } }