Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Commons net 2.2 api

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Commons net 2.2 api

    Hello,
    this is my first post. I'm using commons net 2.2 in a osgi project and I noted that invoking storeFile method it seems not giving exception when ftp transfer falis.
    I'm sure it fails because I'm testing the application on a full disk ftp server, so the files are no uploaded to it. Did someone note the same problem?
    Thank you all


  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Commons net 2.2 api

    why don't you use this line here:

    boolean done = ftpClient.storeFile(RemoteFile, inputStream);
    inputStream.close();
    if (done) {
    System.out.println("The first file is uploaded successfully.");
    }

    Let me know if that helps

Similar Threads

  1. need help with 'org.apache.commons.net.ftp.FTPClient'
    By rtumatt in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: May 22nd, 2013, 07:02 PM
  2. Uploading File to server ( Apache.commons.net)
    By quirell in forum Java Networking
    Replies: 5
    Last Post: November 11th, 2012, 11:06 PM
  3. Replies: 3
    Last Post: March 7th, 2012, 05:54 AM
  4. OSGI - missing imported package=org.apache.commons.collections
    By rcbandit in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 17th, 2012, 11:36 AM
  5. Scanning large FTP directories with apache.commons.net.ftp
    By daniel_el in forum Java Theory & Questions
    Replies: 3
    Last Post: February 10th, 2012, 06:40 AM