Anand Damodaran wrote:What is the character value for \u000D? i get NewLine. is that True?
I think so, but the reason you're getting two characters (almost certainly) is that you're running the program on Windows, which uses the CRLF form for an end-of-line ('LF' stands for 'line feed' which, as I recall, is the same as a Unix newline).
Instead of using an InputStream, which is very low level, why not just use a Scanner (java.util.Scanner) and read in a line at a time? Then you won't have any of those annoying control characters to worry about.
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here