Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

downloaded file byte size problem  RSS feed

 
emilio rossi
Ranch Hand
Posts: 47
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hallo everyopne, i made an application which download a .docx attachment form a mail account using javamail,
but the downloaded file byte size is a bit bigger than the original file so when i try to open it word teels me that the file is corrupted, but clicking ok ok ok... then the files open and its visible, and its how it is supposed to be, the problem is , how to retrieve exactly the original file without the possibility to know the original file byte size?? the code i ,ade (to download the file) made is the following :



thanks to all
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As soon as I read the subject line I expected the problem was caused by using available(), and I was proven to be right. Available Doesn't Do What You Think It Does.

And please UseCodeTags next time. Without them your code was quite hard to read.
 
emilio rossi
Ranch Hand
Posts: 47
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply, everything works fine now and
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!