• Post Reply Bookmark Topic Watch Topic
  • New Topic

file size issue when copying zip with commons net api  RSS feed

 
Rashid Darvesh
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am using jakarta commons api to copy files from my computer to remote computer. i have two zip file and two tab files. The tab files are fine but the zip files copied over as less in size compared the original. is there any setting i need to do to the FTPClient so that the file size matches after it is copied. This is my code
fis = null;
fis = new FileInputStream("/syndi/ED_PIC_ENHANCED_N.zip");
ftp.storeFile("ED_PIC_ENHANCED_N_temp.zip",fis);
Any help
 
Paul Clapham
Sheriff
Posts: 22708
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You need to use BINARY mode for the transfer, something like this:
 
Rashid Darvesh
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot
it works
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!