public static InputSource getInputSource ( File file ) { try { final URL url = file . toURI ( ) . toURL ( ) ; return getInputSource ( url ) ; } catch ( MalformedURLException e ) { return new InputSource ( file . getPath ( ) ) ; } }
Creates an input source for the given file .