Package org.serviceconnector.api.cln

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


      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
      outStream.close();
    } catch (Exception e) {
      LOGGER.error("run", e);
    } finally {
      try {
View Full Code Here


    try {
      // try to connect client
      client = connectClientToService(service);
      SCFileService scFileService = client.newFileService(service.getName());
      dstStream = new FileOutputStream(dstFile);
      scFileService.downloadFile(remoteFile, dstStream);
      writer.writeStartElement("message");
      writer.writeCharacters(dstFile.getName() + "  " + status);
      writer.writeEndElement();
    } catch (Exception e) {
      status = "failed";
View Full Code Here

    localFile = "downloadContent.txt";
    localpath = "src/main/resources/";
    remoteFileName = "uploadedFile.txt";
    File outputFile = new File(localpath + localFile);
    FileOutputStream outStream = new FileOutputStream(outputFile);
    service.downloadFile(180, remoteFileName, outStream);
    outStream.close();
    FileUtility.waitExists(localpath + localFile, 0);
    FileUtility.deleteFile(localpath + localFile);
    FileUtility.deleteFile(TestConstants.filServiceLocation2 + remoteFileName);
  }
View Full Code Here

    localFile = "download200MBContent.txt";
    localpath = "src/main/resources/";
    remoteFileName = "upload200MBFile.txt";
    File outputFile = new File(localpath + localFile);
    FileOutputStream outStream = new FileOutputStream(outputFile);
    service.downloadFile(300, remoteFileName, outStream); // regular download
    outStream.close();
    FileUtility.waitExists(localpath + localFile, 0);
    FileUtility.deleteFile(localpath + localFile);
    FileUtility.deleteFile(TestConstants.filServiceLocation2 + remoteFileName);
  }
View Full Code Here

    try {
      // try to connect client
      client = connectClientToService(service);
      SCFileService scFileService = client.newFileService(service.getName());
      dstStream = new FileOutputStream(dstFile);
      scFileService.downloadFile(remoteFile, dstStream);
      writer.writeStartElement("message");
      writer.writeCharacters(dstFile.getName() + "  " + status);
      writer.writeEndElement();
    } catch (Exception e) {
      status = "failed";
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.