johnsoan smith wrote:I appreciate a lot your replies . I know how to read a file in a character set but the problem is that firstly i have to read it in bytes because all my operations are done in byte level .
Byte level or
character level? They are NOT the same, although many people assume they are because ascii text is stored as bytes.
So the real question here is: Are you reading
text, or is this something like a JPEG image ... or is it some hybrid format that only you and the people who wrote it understand?
If it's text, then the best way to read it is with a
BufferedReader as described by others; and if the text is in the form of
lines, you should read it a line at a time.
That doesn't mean that you can't process the
content character-by-character if you need to.
Winston