• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

What File Type to use? - Apache commons

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic