code: public static <T> T eachLine(InputStream stream, String charset, int firstLine, @ClosureParams(value=FromString.class,options={"String","String,Integer"}) Closure<T> closure) throws IOException {
          return eachLine(new InputStreamReader(stream, charset), firstLine, closure);
      }
docs: Iterates through this stream reading with the provided charset, passing each line to
  the given 1 or 2 arg closure.  The stream is closed after this method returns.
  
  @param stream    a stream
  @param charset   opens the stream with a specified charset
  @param firstLine the line number value used for the first line (default is 1, set to 0 to start counting from 0)
  @param closure   a closure (arg 1 is line, optional arg 2 is line number)
  @return the last value returned by the closure
  @throws IOException if an IOException occurs.
  @see #eachLine(java.io.Reader, int, groovy.lang.Closure)
  @since 1.5.7