Package org.serviceconnector.api.cln

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


    /** {@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

    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

    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

    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

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

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

    // download now
View Full Code Here

    /** {@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

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.