question: public static InputStream streamFromString ( String location ) throws IOException { InputStream is = null ; URL url = urlFromString ( location , null , false ) ; if ( url != null ) { is = url . openStream ( ) ; } else { File f = new File ( location ) ; if ( f . exists ( ) ) is = new FileInputStream ( f ) ; } if ( is == null ) { return null ; } else if ( isGZipFile ( location ) ) { return new GZIPInputStream ( is ) ; } else { return is ; } }
target:  Get an input string corresponding to the given location string. The string will first be resolved to a URL and an input stream will be requested from the URL connection. If this fails, the location will be resolved against the file system. Also, if a gzip file is found, the input stream will also be wrapped by a GZipInputStream. If the location string can not be resolved, a null value is returned