Examples of uploadFile()

  • org.modeshape.jcr.api.JcrTools.uploadFile()
    Upload the content in the supplied stream into the repository at the defined path, using the given session. This method will create a 'nt:file' node at the supplied path, and any non-existant ancestors with nodes of type 'nt:folder'. As defined by the JCR specification, the binary content (and other properties) will be placed on a child of the 'nt:file' node named 'jcr:content' with a node type of 'nt:resource'.

    This method always closes the supplied stream.

    @param session the JCR session @param path the path to the file @param stream the stream containing the content to be uploaded @return the newly created 'nt:file' node @throws RepositoryException if there is a problem uploading the file @throws IOException if there is a problem using the stream @throws IllegalArgumentException is any of the parameters are null
  • org.serviceconnector.api.cln.SCFileService.uploadFile()
    Upload file with default operation timeout. @param remoteFileName the remote file name to store the file @param inStream stream to upload @throws SCServiceException create file session to SC failed
    upload file to Server failed
    error message received from SC
  • org.uengine.util.ftp.Uploader.uploadFile()
  • sendspaceapi.Upload.Anonymous.AnonymousUpload.uploadFile()

  • Examples of com.ettrema.httpclient.Host.uploadFile()

           
            java.io.File tmp=java.io.File.createTempFile("filetest", ".txt");
            FileUtils.writeStringToFile(tmp, "this is a test text 888");
           
            try{
              File uploaded = hh.uploadFile(tmp);
            } catch (Exception e){
              //This is expected: User does not have permission to publish contentlets
              Assert.assertTrue(e instanceof InternalServerError);
            }
    View Full Code Here

    Examples of com.google.appengine.tck.blobstore.support.FileUploader.uploadFile()

        @RunAsClient
        @InSequence(10)
        public void testUploadedFileHasCorrectContent_upload(@ArquillianResource URL url) throws Exception {
            FileUploader fileUploader = new FileUploader();
            String uploadUrl = fileUploader.getUploadUrl(new URL(url, "getUploadUrl"));
            fileUploader.uploadFile(uploadUrl, "file", FILENAME, CONTENT_TYPE, UPLOADED_CONTENT);
        }

        @Test
        @InSequence(20)
        public void testUploadedFileHasCorrectContent_assert() throws Exception {
    View Full Code Here

    Examples of com.ibm.sbt.services.client.connections.files.FileService.uploadFile()

            InputStream is;

           try {
           
              is = new FileInputStream(serverFile);
          com.ibm.sbt.services.client.connections.files.File entry = svc.uploadFile(is,name, serverFile.length(),p.buildParameters());
            
        }catch (ClientServicesException e) {
                throw new FacesExceptionEx(e);
            } catch (FileNotFoundException e) {
          // TODO Auto-generated catch block
    View Full Code Here

    Examples of com.sun.enterprise.admin.common.JMXFileTransfer.uploadFile()

                JMXConnector jmxC = getJMXConnector(
                        new JMXServiceURL(dasReader.getJMXURL()));
                MBeanServerConnection mbsc = jmxC.getMBeanServerConnection();
                // upload zip file using JMXFileTransfer
                JMXFileTransfer jmxFileTfr = new JMXFileTransfer(mbsc);
                jmxFileTfr.uploadFile(zipFileName, UPLOAD_DIRECTORY);
            } catch (java.net.MalformedURLException mfue) {
                _logger.log(Level.WARNING,
                        "nodeAgentDiagnostic.incorrect_jmx_service_url", mfue);
            } catch (java.io.IOException ioe) {
                _logger.log(Level.WARNING,
    View Full Code Here

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

                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

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

                    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

    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

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

        private void uploadFile(InvocationContext context, URI dest, String localFile) throws SecurityException,
                ToolsException {
            GridFtp ftp = new GridFtp();
            GSSCredential gssCred = ((GSISecurityContext) context.getSecurityContext(MYPROXY_SECURITY_CONTEXT))
                    .getGssCredentails();
            ftp.uploadFile(dest, gssCred, new File(localFile));
        }
    }
    View Full Code Here

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

                try {
                    URI destURI = GfacUtils.createGsiftpURI(endpoint, remoteLocation);
                    InputStream in = null;
                    try {
                        in = src.toURL().openStream();
                        ftp.uploadFile(destURI, gssCred, in);
                    } finally {
                        try {
                            if (in != null) {
                                in.close();
                            }
    View Full Code Here

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

                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
    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.