Do not use BufferedReader because the level of abstraction seems too high for your specific tasks. Use regular InputStream and read into byte array. An InputStream will read all bytes as is. You can process them, and later create lines yourself, using a new line (array, offset, length) . It could possibly be other invalid characters, such as 0x0C at the input.
source share