• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

What File Type to use? - Apache commons

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have downloaded a package from the apache commons website
to handle FTP. I've got it working OK, but am a bit confused on
when to set the file type. At the moment I am just using the
default which is

ftpClient.setFileType(FTP.ASCII_FILE_TYPE).

How can I tell when I need to change this for a certain type of file ?
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most FTP clients I use the file extension to detect whether to transfer in ASCII or binary mode. Typically the user can configure which extensions are ASCII text. Perhaps you can use a similar scheme.

Layne
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I too m using commons-net library for ftp purpose.I got a problem i m not able to list files in the specified path if the path has spaces in between them.
For eg:/lib/lib stand is not able to detect.

can you please help me out in this.

Thanks in advance.
 
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic