Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-57

[net] How to implement FTPS extending FTPClient, from a diferente package...

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 38309

    Description

      Hi everybody, I'm Jose from Spain.

      I make an implement of FTPS: using
      http://sourceforge.net/projects/ufsc implementation (which use a new
      class, created by UFSC, org.apache.commons.net.ftp.FtpsClient that
      extends org.apache.commons.net.ftp.FTPClient), with some minor
      modification to adapt Java 1.3 and solve some fix with PASV transfer
      (modification and fix, that i comunicate to the author).

      I try to build FtpsClient under diferent packege, then i found that
      couldn't do it because, in org.apache.commons.net.ftp.FTP the
      variables

      BufferedReader _controlInput;
      BufferedWriter _controlOutput;

      were declare with packege visibility, and FtpsClient use this, to
      implement securety
      connection to SSLSocket. Something like this:

      this._controlInput = new BufferedReader(new
      InputStreamReader(socket.getInputStream(), getControlEncoding()));
      this._controlOutput = new BufferedWriter(new
      OutputStreamWriter(socket.getOutputStream(), getControlEncoding()));

      Because of this, FtpsClient, in UFSC, is under org.apache.commons.net.ftp.

      Then the solution I adopt, was copy (and minor modify) FTPClient and
      FTP from org.apache.commons.net.ftp in my own package, and extends
      FtpsClient, from my own FTPClient, to make it in a difetent pakage...

      And my suggestion is: It could be possible, for future version, declare
      protected, for simplify the extension of api, to implement FTPS, or other future
      protocol... in diferent package...?

      as well, could by a setter, for this variables, to assing then the socket stream...

      Thanks to all.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--ftps.zip
          8 kB
          Jose Juan Montiel
        2. ASF.LICENSE.NOT.GRANTED--ftps.zip
          5 kB
          Jose Juan Montiel
        3. ASF.LICENSE.NOT.GRANTED--patch.txt
          0.9 kB
          Jose Juan Montiel
        4. ASF.LICENSE.NOT.GRANTED--patch.txt
          0.6 kB
          Jose Juan Montiel

        Activity

          People

            Unassigned Unassigned
            josejuan.montiel@gmail.com Jose Juan Montiel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: