0

When I am taking input from file using Ubuntu as OS, DataInputStream is giving different values from the number in file. What to do about it??

I dont know much about file int, I also tried out using BufferedStream, Still getting some strange values.

Please reply soon.

2
Contributors
1
Reply
3
Views
9 Years
Discussion Span
Last Post by harsh2327
0

read() method in BufferedStream returns an int .

If you are want to read characters then you will have to typecast the integer to char like

char c = (int)<YOUR_OBJECT_HERE>.read()

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.