File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot convert from long to byte

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for some reason I get this error in this code, how can I fix it?

 
Keith Lynn
Ranch Hand
Posts: 2399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you familiar with casting?
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I tried this and it worked, thanks
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
however I get strange results


It prints out "-77 -77 -77 -77" I can figure out why I get the same numbers
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: The >> operator has preference above the & operator.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic