我该怎么说
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
在遇到行终端“\ r \ n”时停止读取缓冲区?
答案 0 :(得分:1)
类似的东西:
String strLine = null;
//Read File Line By Line
while ((strLine = in.readLine()) != null ) {
if(strLine.contains("\r\n")){
break;
}
}// end while
in.close();
...