title: Reading carriage return and new lines in Java
body: <p>I have a SOAP XML that at the start has a custom header that I wrote. I have TCP/IP Connection, and I receive Header + SOAP XML. The header has at the end \r\n\r\n. When I try to read the socket, I use bufferInputstream and it has readnextline, and that removes that \r\n\r\n that I use which means that I reached the end of the header, and hence I can not decode the header correctly. Is there a function that can ignore the carriage return and new lines, and stores the socket response in a string ?</p>