Examples of openConnectionOnly()


Examples of net.sf.jabref.net.URLDownload.openConnectionOnly()

                       
                        // Check the MIME type of this URL to see if it is a PDF. If not,
                        // it could be because the user doesn't have access:
                        try {
                            URLDownload udl = new URLDownload(null, result, null);
                            udl.openConnectionOnly();

                            String mimeType = udl.getMimeType();
                            if ((mimeType != null) && (mimeType.toLowerCase().equals("application/pdf"))) {
                                return new FindResult(result, url);
                            }
View Full Code Here

Examples of net.sf.jabref.net.URLDownload.openConnectionOnly()

        //long time = System.currentTimeMillis();
        try {
            udl = new URLDownload(frame, url, tmp);
            // TODO: what if this takes long time?
            // TODO: stop editor dialog if this results in an error:
            udl.openConnectionOnly(); // Read MIME type
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL")+": "
                    + ex.getMessage(), Globals.lang("Download file"),
                    JOptionPane.ERROR_MESSAGE);
            Globals.logger("Error while downloading " + "'" + res + "'");
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.