Examples of FtpDataTransiver


Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         port = new Integer(addrValues[4]) * 256 + new Integer(addrValues[5]);

         if (FtpConst.Replyes.REPLY_227 == reply)
         {
            FtpDataTransiver dataTransiver = new FtpDataTransiverImpl();
            dataTransiver.OpenPassive(host, port);
            clientSession.setDataTransiver(dataTransiver);
         }

         return reply;
      }
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         int reply = getReply();

         if (reply == FtpConst.Replyes.REPLY_125)
         {
            FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

            for (int i = 0; i < 15; i++)
            {
               if (!dataTransiver.isConnected())
               {
                  Thread.sleep(1000);
               }
            }

            byte[] data = dataTransiver.receive();
            dataTransiver.close();

            String dd = "";
            for (int i = 0; i < data.length; i++)
            {
               dd += (char)data[i];
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         int reply = getReply();

         if (reply == FtpConst.Replyes.REPLY_125 || reply == FtpConst.Replyes.REPLY_150)
         {
            FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

            fileData = dataTransiver.receive();

            dataTransiver.close();

            String dd = new String(fileData, "windows-1251");

            String[] lines = dd.split("\r\n");
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         return -1;
      }

      try
      {
         FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

         if (dataTransiver != null)
         {
            for (int i = 0; i < 150; i++)
            {
               if (!dataTransiver.isConnected())
               {
                  Thread.sleep(100);
               }
            }
         }

         if (path == null)
         {
            sendCommand(FtpConst.Commands.CMD_STOR);
            return getReply();
         }

         sendCommand(String.format("%s %s", FtpConst.Commands.CMD_STOR, path));

         int reply = getReply();
         if (reply == FtpConst.Replyes.REPLY_125)
         {
            dataTransiver.send(fileContent);
            reply = getReply();
         }
         return reply;
      }
      catch (Exception exc)
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         int reply = getReply();

         if (reply == FtpConst.Replyes.REPLY_125)
         {
            FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

            for (int i = 0; i < 15; i++)
            {
               if (!dataTransiver.isConnected())
               {
                  Thread.sleep(1000);
               }
            }

            byte[] data = dataTransiver.receive();
            dataTransiver.close();

            StringBuilder dd = new StringBuilder();
            for (int i = 0; i < data.length; i++)
            {
               dd.append((char)data[i]);
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         int reply = getReply();

         if (reply == FtpConst.Replyes.REPLY_125)
         {
            FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

            for (int i = 0; i < 15; i++)
            {
               if (!dataTransiver.isConnected())
               {
                  Thread.sleep(1000);
               }
            }

            byte[] data = dataTransiver.receive();
            dataTransiver.close();

            StringBuilder dd = new StringBuilder();
            for (int i = 0; i < data.length; i++)
            {
               dd.append((char)data[i]);
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         int reply = getReply();

         if (reply == FtpConst.Replyes.REPLY_125 || reply == FtpConst.Replyes.REPLY_150)
         {
            FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

            fileData = dataTransiver.receive();

            dataTransiver.close();

            String dd = new String(fileData, "utf-8");

            String[] lines = dd.split("\r\n");
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         {
            enableSearch = false;
         }
      }

      FtpDataTransiver dataTransiver = new FtpDataTransiverImpl();
      dataTransiver.OpenActive(port);
      client.setDataTransiver(dataTransiver);

      try
      {
         Thread.sleep(1000);
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         return -1;
      }

      try
      {
         FtpDataTransiver dataTransiver = clientSession.getDataTransiver();

         if (dataTransiver != null)
         {
            for (int i = 0; i < 150; i++)
            {
               if (!dataTransiver.isConnected())
               {
                  Thread.sleep(100);
               }
            }
         }

         if (path == null)
         {
            sendCommand(FtpConst.Commands.CMD_STOR);
            return getReply();
         }

         sendCommand(String.format("%s %s", FtpConst.Commands.CMD_STOR, path));

         int reply = getReply();
         if (reply == FtpConst.Replyes.REPLY_125)
         {
            dataTransiver.send(fileContent);
            reply = getReply();
         }
         return reply;
      }
      catch (Exception exc)
View Full Code Here

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver

         port = new Integer(addrValues[4]) * 256 + new Integer(addrValues[5]);

         if (FtpConst.Replyes.REPLY_227 == reply)
         {
            FtpDataTransiver dataTransiver = new FtpDataTransiverImpl();
            dataTransiver.OpenPassive(host, port);
            clientSession.setDataTransiver(dataTransiver);
         }

         return reply;
      }
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.