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 org.jahia.services.content.JCRNodeWrapper.uploadFile()

                            newName = JCRContentUtils.findAvailableNodeName(folder, newName);
                        }

                        FileInputStream convertedStream = new FileInputStream(temp);
                        try {
                            folder.uploadFile(newName, convertedStream, format.getMediaType());
                            logger.info("Converted node " + nodeFact.getPath() + " to type " + format.getMediaType());
                        } finally {
                            IOUtils.closeQuietly(convertedStream);
                        }
                    } finally {
    View Full Code Here

    Examples of org.jboss.soa.esb.util.RemoteFileSystem.uploadFile()

        File fileToSend = null;
        RemoteFileSystem rfs = null;
        try {
          fileToSend = getFileToSend( message );
          rfs = RemoteFileSystemFactory.getRemoteFileSystem(getFtpEpr(), true);
          rfs.uploadFile(fileToSend, getFileName(message));
        } catch (RemoteFileSystemException e) {
          throw new NotificationException("Could not complete FTP notification", e);
        } catch (IOException e) {
          throw new NotificationException("Could not complete FTP notification", e);
        } finally {
    View Full Code Here

    Examples of org.jboss.soa.esb.util.RemoteFileSystem.uploadFile()

          rfs = RemoteFileSystemFactory.getRemoteFileSystem(ftpEpr, true);
          rfs.setRemoteDir(FtpClientUtil.fileToFtpString(_inputDirectory));

          File tmpFile = File.createTempFile("RemoteGW", ".forUpload");
          super.bytesToFile(bytes, tmpFile);
          rfs.uploadFile(tmpFile, file.getName());
          tmpFile.delete();

        } catch (Exception e) {
          throw new GatewayException(e);
        } finally {
    View Full Code Here

    Examples of org.jboss.soa.esb.util.RemoteFileSystem.uploadFile()

                    {
                            String name = file.getName();
                            final RemoteFileSystem handler = getHandler() ;
                            try
                            {
                                handler.uploadFile(file, name);
                            }
                            finally
                            {
                                handler.quit();
                            }
    View Full Code Here

    Examples of org.modeshape.jcr.api.JcrTools.uploadFile()

                Node filesNode = root.addNode("files", "nt:folder");
                assert filesNode != null;

                // Update a couple of files ...
                tools.uploadFile(session, "/files/caution.png", getFile("caution.png"));
                tools.uploadFile(session, "/files/sample1.mp3", getFile("sample1.mp3"));
                tools.uploadFile(session, "/files/fixedWidthFile.txt", getFile("fixedWidthFile.txt"));
                tools.uploadFile(session, "/files/JcrRepository.class", getFile("JcrRepository.clazz"));

                // Save the session ...
                session.save();
    View Full Code Here

    Examples of org.serviceconnector.api.cln.SCFileService.uploadFile()

          File localFile = new File("src/main/resources/uploadContent.txt");
          InputStream inpStream = new FileInputStream(localFile);
          String targetFileName = "uploadContent.txt";

          service.uploadFile(targetFileName, inpStream); // regular upload

          localFile = new File("src/main/resources/downloadContent.txt");
          FileOutputStream outStream = new FileOutputStream(localFile);
          targetFileName = "uploadContent.txt";
          service.downloadFile(targetFileName, outStream); // regular download
    View Full Code Here

    Examples of org.serviceconnector.api.cln.SCFileService.uploadFile()

        /** {@inheritDoc} */
        @Override
        public Integer call() {
          try {
            SCFileService scFileService = client.newFileService(this.serviceName);
            scFileService.uploadFile(360, this.remotePath, this.is);
            // reads buffer intern until the end of output stream
            client.detach();
            return 0;
          } catch (Exception e) {
            LOGGER.error(e.toString());
    View Full Code Here

    Examples of org.serviceconnector.api.cln.SCFileService.uploadFile()

        String localFile = "uploadFile.txt";
        String localpath = "src/main/resources/";
        String remoteFileName = "uploadedFile.txt";
        File inputFile = new File(localpath + localFile);
        InputStream inpStream = new FileInputStream(inputFile);
        service.uploadFile(remoteFileName, inpStream);
        inpStream.close();
        FileUtility.waitExists(TestConstants.filServiceLocation2 + remoteFileName, 0);
        FileUtility.deleteFile(TestConstants.filServiceLocation2 + remoteFileName);
      }
    View Full Code Here

    Examples of org.serviceconnector.api.cln.SCFileService.uploadFile()

        String localFile = "uploadFile.txt";
        String localpath = "src/main/resources/";
        String remoteFileName = "uploadedFile.txt";
        File inputFile = new File(localpath + localFile);
        InputStream inpStream = new FileInputStream(inputFile);
        service.uploadFile(180, remoteFileName, inpStream);
        inpStream.close();

        // list now
        List<String> fileNameList = service.listFiles();
        for (String fileName : fileNameList) {
    View Full Code Here

    Examples of org.serviceconnector.api.cln.SCFileService.uploadFile()

        String localFile = "uploadFile.txt";
        String localpath = "src/main/resources/";
        String remoteFileName = "uploadedFile.txt";
        File inputFile = new File(localpath + localFile);
        InputStream inpStream = new FileInputStream(inputFile);
        service.uploadFile(180, remoteFileName, inpStream);
        inpStream.close();
        FileUtility.waitExists(TestConstants.filServiceLocation2 + remoteFileName, 0);

        // download now
        localFile = "downloadContent.txt";
    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.