ネットワークソケットのプログラミング方法について読んでいて、次のコードに出くわしました。
try {     
   while (true) {   // This is the line in question
     int i = in.read(  );
     if (i == -1) break;
     System.out.write(i);
   }
 }
 catch (SocketException e) {
   // output thread closed the socket
 }
 catch (IOException e) {
   System.err.println(e);
 }
2 行目は、いつ失敗するかをどのように知るのでしょうか? while(true)つまり、ループはどのように機能するのでしょうか。何が本当なの?