Package java.net

Examples of java.net.URL.openStream()


            URL csvURL = PropUtils.getResourceOrFileOrURL(null, locationFile);
            if (csvURL == null) {

            }
            streamReader = new BufferedReader(new InputStreamReader(csvURL.openStream()));
            CSVTokenizer csvt = new CSVTokenizer(streamReader);

            token = csvt.token();

            while (!csvt.isEOF(token)) {
View Full Code Here


    public Properties findAndLoadProperties(String propertiesResource) {
        try {
            URL url = PropUtils.getResourceOrFileOrURL(SymbolReferenceLibrary.class,
                    propertiesResource);
            Properties props = new Properties();
            props.load(url.openStream());
            return props;
        } catch (java.net.MalformedURLException murle) {
            Debug.output("SymbolReferenceLibrary has malformed path to "
                    + propertiesResource);
        } catch (java.io.IOException ioe) {
View Full Code Here

                    if (tmpInclude == null) {
                        continue;
                    }

                    InputStream is = tmpInclude.openStream();
                    tmpProps.load(is);
                    if (DEBUG) {
                        Debug.output("PropertyHandler.getIncludeProperties(): located include properties file URL: "
                                + include);
                    }
View Full Code Here

        args = new LinkProperties();

        if (propertiesURL != null) {
            try {
                URL propertiesFile = new URL(propertiesURL);
                args.load(propertiesFile.openStream());
            } catch (java.net.MalformedURLException mue) {
                System.err.println("LinkLayer:  Properties URL isn't valid: "
                        + propertiesURL);
                System.err.println(mue);
            } catch (IOException ioe) {
View Full Code Here

        args = new LinkProperties(); // Empty if not filled.
        if (propertiesURL != null) {
            try {
                URL propertiesFile = new URL(propertiesURL);
                args.load(propertiesFile.openStream());

                // Need to do something here. The LinkPropertiesConstants have
                // changed in LinkProtocol version .6, to much small strings
                // that don't match up with the DrawingAttributes properties. We
                // need to check for the old property names and replace them
View Full Code Here

        } catch (MalformedURLException e) {
            throw new DynamicError("Invalid URL form: " + viewloc);
        }
        final InputStream is;
        try {
            is = queryUrl.openStream();
        } catch (IOException e) {
            throw new DynamicError("failed to open stream for " + queryUrl);
        }
        Reader reader = new InputStreamReader(is);
        return reader;
View Full Code Here

                            ;
                            list = EsriGraphicList.getEsriGraphicList(url,
                                    null,
                                    dbf);
                        } else {
                            ObjectInputStream ois = new ObjectInputStream(url.openStream());
                            list = (OMGraphicList) ois.readObject();
                            ois.close();
                        }
                        for (int j = 0; j < list.size(); j++) {
                            graphicList.add(list.getOMGraphicAt(j));
View Full Code Here

        out.println("URL " + surl);
        Reader r;
        URL url;
        try {
            url = new URL(surl);
            r = new InputStreamReader(url.openStream());
        } catch (MalformedURLException mue) {
            out.println("   bad URL");
            return urls;
        }
        Set names = new HashSet();
View Full Code Here

            // This lets the property be specified as a file name
            // even if it's not specified as file:/<name> in
            // the properties file.
            URL csvURL = infoUrl;
            streamReader = new BufferedReader(new InputStreamReader(csvURL.openStream()));
            CSVTokenizer csvt = new CSVTokenizer(streamReader, readNumbersAsStrings);
            int count = 0;
            token = csvt.token();
            while (!csvt.isEOF(token)) {
                count++;
View Full Code Here

            Debug.message("dtedcov",
                    "DTEDCoverageManager: Reading coverage file from URL - "
                            + urlCov);
            try {
                url = new URL(urlCov);
                bin = new BufferedInputStream(url.openStream());
            } catch (MalformedURLException mue) {
                System.err.println("DTEDCoverageManager: Weird URL given : \""
                        + urlCov + "\"");
                bin = null;
            } catch (java.io.IOException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.