I'm reading in data from a file which is "packed" (each two values packed into one bit). I can view this data with an unpack utility to verify that it is correct. However, when I bring it in to my
Java app, it reads two characters in wrong.. ie: reads both 24 and 85 in as 45.
My method of reading in from the file is using BufferedReader.readLine() into a
String variable and then using String.getBytes() to then begin parsing the string to "unpack" it.
As stated, it works in all cases except two values.
In an attempt to get a unique value for each so I can individually parse them, I have tried to out to the command line things like the ASCII value, Integer.decode, and String.hashCode... but they all seem to be read in as identicle values even though I have proven they are not identicle in my other viewer.
Any suggestions as to tests to try against the two in order to prove them not equal are appreciated and will be attempted.
If using BufferedReader into a string then getBytes is my problem, I will attempt to change it to your suggestion.
Thanks in advance.