I am using a BufferedReader to read details from a file which are stored as bytes, I am then converting the bytes into text and splitting it into an
BufferedReader
bytes
white spaces may cos this error. try to trim() the input line while reading line,
trim()
like,
line = bufferedReader.readLine().trim();