android socket TCP线终止器



我如何告诉

 BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
当遇到行终端"rn"时,

停止读取缓冲区?

像这样:

String strLine = null;
//Read File Line By Line
while ((strLine = in.readLine()) != null  )   {
        if(strLine.contains("rn")){
                break;
             }

        }// end while
         in.close();
         ...

相关内容

  • 没有找到相关文章

最新更新