Addresses (7)

   // Addresses continued
   String readLine(InputStream input) 
            throws java.io.IOException {
      byte chars[] = new byte[lineLength];
      int count = 0;

      while (count < lineLength && 
            (chars[count++] = 
              (byte) input.read()) != '\n')
         if (chars[count-1] == -1)
            return null;
      return new String(chars, 0, 0, 
                        count-1);
   }


Slide 15 ©Copyright 1997 Jan Newmarch