Examples of storeFile()


Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

                    Boolean passiveMode = (Boolean) context.get("passiveMode");
                    boolean passive = (passiveMode == null) ? true : passiveMode.booleanValue();
                    if (passive) { ftp.enterLocalPassiveMode(); }

                    Debug.logInfo("[putFile] storing local file remotely as: " + context.get("remoteFilename"), module);
                    if (!ftp.storeFile((String) context.get("remoteFilename"), localFile)) {
                        Debug.logInfo("[putFile] store was unsuccessful", module);
                        errorList.add("File not sent succesfully: " + ftp.getReplyString());
                    } else {
                        Debug.logInfo("[putFile] store was successful", module);
                        List siteCommands = (List) context.get("siteCommands");
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

     
      //DEPENDS ON NAMING CONVENTION for the models-here ANNs were used so it is netASC_ID.m
      String filename = "net"+ASC_ID+".m";
      String pathname="YOUR_RULE_STORING_PATH"; //DEPENDS ON WHERE THE RULES ARE STORED IN THE OCTAVE SCRIPT
      fis = new FileInputStream(pathname+filename);
      client.storeFile("/uploads/rules/"+filename, fis);//possible change according to path on FTP server
      client.logout();
    } catch (IOException e) {
     
      System.out.println("Error connecting to ftp server for storing rules....");
      e.printStackTrace();
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

            if (storeFile)
            {
                InputStream input;

                input = new FileInputStream(local);
                ftp.storeFile(remote, input);
            }
            else
            {
                OutputStream output;
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

            {
                InputStream input;

                input = new FileInputStream(local);

                ftp.storeFile(remote, input);

                input.close();
            }
            else
            {
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

                //
                // transfer file
                //
                String filename = "CSW.Harvest.result";
                InputStream is = new ByteArrayInputStream(harvestResponse.getBytes(Constants.ENCODING));
                ftpClient.storeFile(filename, is);
                is.close();
                ftpClient.logout();
            }
            // never mind, just log it
            catch(IOException x) {
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

            {
                InputStream input;

                input = new FileInputStream(local);

                ftp.storeFile(remote, input);

                input.close();
            }
            else if (listFiles)
            {
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

          url = this.url.toString().replaceFirst(this.url.getPath(), "")+"/";
        } else {
          url = this.url.toString();
        }
       
    ftp.storeFile(filename, in);
    ftp.quit();
    ftp.disconnect();
   
    return new URL(url + filename);
  }
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

            {
                InputStream input;

                input = new FileInputStream(local);

                ftp.storeFile(remote, input);

                input.close();
            }
            else
            {
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

              ftp.makeDirectory(s);
              ftp.changeWorkingDirectory(p);
            }
          }
        }
        ftp.storeFile(name, in);
        ftp.logout();
        ftp.disconnect();
      }
      in.close();
      return 0;
View Full Code Here

Examples of org.apache.commons.net.ftp.FTPClient.storeFile()

    InputStream is=null;
   
        try {
          is=IOUtil.toBufferedInputStream(local.getInputStream());
          client.setFileType(getType(local));
            client.storeFile(remotefile,is);
        }
        finally {
          IOUtil.closeEL(is);
        }
        writeCfftp(client);
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.