This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

issue with the zip file when downloaded from linux to windows  RSS feed

 
asma khanammd
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a problem with the file downloaded from linux to windows which is zipped using tar cmd. it is downloaded perfectly. when i try to unzip it in windows,
it shows an alert saying some bytes are missing. how to resolve this issue. thanks in advance. i am using org.apache.commons.net.ftp.FTPClient.

I am using this method objClient.retrieveFile(source + strNewFileName, fos); for writing it to output stream.
 
Rob Spoor
Sheriff
Posts: 21090
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Are you sure it's downloaded perfectly? Is the number of bytes (not kilobytes or megabytes) exactly the same on both machines? Did you use binary mode for transferring?
 
asma khanammd
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using the binary format only by using setFileType(FTP.BINARY_FILE_TYPE) method. the files from linux are password protected. i forgot to mention this.
thank you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!