Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What File Type to use? - Apache commons  RSS feed

 
raj NZ
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 ?
 
Layne Lund
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
 
yathish Gatty
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!