docs: private void checkSystemInput()
          throws IOException
      {
          while ( System.in.available() > 0 )
          {
              int input = System.in.read();
              if ( input >= 0 )
              {
                  char c = (char) input;
                  if ( c == '\n' )
                  {
                      synchronized ( lock )
                      {
                          finished = true;
                          lock.notifyAll();
                      }
                  }
              }
              else
              {
                  synchronized ( lock )
                  {
                      finished = true;
                      lock.notifyAll();
                  }
              }
          }
      }