I am trying to implement a calculator protocol over a server and I have setted up a client and a server. The client will be sending data to the client such as "CALC ver3 \nValue 54.6" and "OPER ver3 \nOperation: ADD". I am trying to find for the server to read the data while ignoring the \n. At the moment, I have a BufferedReader set up, and I am using the readLine() method to process the input. The problem here is that readLine() considers a line to terminate when it sees the \n which is not what I want. Are there any alternatives to solve my problem?