• Post Reply Bookmark Topic Watch Topic
  • New Topic

Type mismatch: cannot convert from FileInputStream to Base64.InputStream  RSS feed

 
Luk Cora
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm following a lot of tutorial for allow the download of file throught struts architecture...
All of the tutotrial reports a syntax like this:


for exemple this
http://www.mkyong.com/struts2/struts-2-download-file-example/


But when i place this part of code into Eclipse, it retrive me the error Type mismatch: cannot convert from FileInputStream to Base64.InputStream...
This because the fileInputStream variabile is of InputStream type while the exemple instatantiates a FileInputStream
Why?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luca Coraggio wrote:

But when i place this part of code into Eclipse, it retrive me the error Type mismatch: cannot convert from FileInputStream to Base64.InputStream...



I'm guessing you imported the wrong InputStream. What do the import statements look like in your code? Make sure you have:



and not the Base64 one as is being reported.
 
Luk Cora
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
solved thanks, this was the problem
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!