Package com.salesforce.dataloader.util

Examples of com.salesforce.dataloader.util.StreamGobbler


                        public void run() {
                            int exitVal = 0;
                            try {
                                String[] cmd = { "cmd.exe", "/c", "\"" + filename + "\"" }; //$NON-NLS-1$ //$NON-NLS-2$
                                Process proc = Runtime.getRuntime().exec(cmd);
                                StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR"); //$NON-NLS-1$
                                StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT"); //$NON-NLS-1$
                                errorGobbler.start();
                                outputGobbler.start();
                                exitVal = proc.waitFor();
                            } catch (IOException iox) {
                                logger.error(Labels.getString("CSVViewerDialog.errorExternal"), iox); //$NON-NLS-1$
                            } catch (InterruptedException ie) {
                                logger.error(Labels.getString("CSVViewerDialog.errorExternal"), ie); //$NON-NLS-1$
View Full Code Here


                    @Override
                    public void run() {
                        int exitVal = 0;
                        try {
                            Process proc = Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler " + linkURL);
                            StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR"); //$NON-NLS-1$
                            StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT"); //$NON-NLS-1$
                            errorGobbler.start();
                            outputGobbler.start();
                            exitVal = proc.waitFor();
                        } catch (IOException iox) {
                            logger.error("Browser Error", iox);
                        } catch (InterruptedException ie) {
                            logger.error("Browser Error", ie);
View Full Code Here

TOP

Related Classes of com.salesforce.dataloader.util.StreamGobbler

Copyright © 2018 www.massapicom. 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.