• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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.
 
Pay attention! Tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!