Package org.apache.airavata.core.gfac.external

Examples of org.apache.airavata.core.gfac.external.GridFtp.uploadFile()


                    ftp.uploadFile(gridftpURL, destURI, gssCred);
                } else if (paramValue.startsWith("file")) {
                    String localFile = paramValue.substring(paramValue.indexOf(":")+1, paramValue.length());
                    ftp.uploadFile(destURI, gssCred, new FileInputStream(localFile));
                }else if (paramValue.startsWith("http")) {
                    ftp.uploadFile(destURI,
                            gssCred, (gridftpURL.toURL().openStream()));
                }else {
                    //todo throw exception telling unsupported protocol
                    return paramValue;
                }
View Full Code Here


            String s = inputURI.getPath() + File.separator + fileName;
            //if user give a url just to refer an endpoint, not a web resource we are not doing any transfer
            if (fileName != null && !"".equals(fileName)) {
                destURI = GfacUtils.createGsiftpURI(endpoint, s);
                if (paramValue.startsWith("gsiftp")) {
                    ftp.uploadFile(gridftpURL, destURI, gssCred);
                } else if (paramValue.startsWith("file")) {
                    String localFile = paramValue.substring(paramValue.indexOf(":")+1, paramValue.length());
                    ftp.uploadFile(destURI, gssCred, new FileInputStream(localFile));
                }else if (paramValue.startsWith("http")) {
                    ftp.uploadFile(destURI,
View Full Code Here

                destURI = GfacUtils.createGsiftpURI(endpoint, s);
                if (paramValue.startsWith("gsiftp")) {
                    ftp.uploadFile(gridftpURL, destURI, gssCred);
                } else if (paramValue.startsWith("file")) {
                    String localFile = paramValue.substring(paramValue.indexOf(":")+1, paramValue.length());
                    ftp.uploadFile(destURI, gssCred, new FileInputStream(localFile));
                }else if (paramValue.startsWith("http")) {
                    ftp.uploadFile(destURI,
                            gssCred, (gridftpURL.toURL().openStream()));
                }else {
                    //todo throw exception telling unsupported protocol
View Full Code Here

                    ftp.uploadFile(gridftpURL, destURI, gssCred);
                } else if (paramValue.startsWith("file")) {
                    String localFile = paramValue.substring(paramValue.indexOf(":")+1, paramValue.length());
                    ftp.uploadFile(destURI, gssCred, new FileInputStream(localFile));
                }else if (paramValue.startsWith("http")) {
                    ftp.uploadFile(destURI,
                            gssCred, (gridftpURL.toURL().openStream()));
                }else {
                    //todo throw exception telling unsupported protocol
                    return paramValue;
                }
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.