This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The method needs to be able to read a byte of data (256 possible values) or indicate there are no more values. So it needs to return 257 possibilities. A byte can only hold 256. If it returned a byte, how do you tell the difference between reading a -1 from the file and reaching the end of the stream?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Why read() method of FileInputStream returns int instead of byte?