code: public int[] ENgetlinknodes( int index ) throws EpanetException {
          int[] from = new int[1];
          int[] to = new int[1];
          int error = epanet.ENgetlinknodes(index, from, to);
          checkError(error);
          return new int[]{from[0], to[0]};
      }
docs: Retrieves the indexes of the end nodes of a specified link.
  
  <p> Node and link indexes are consecutive integers starting from 1.
  
  <p>The From and To nodes are as defined for the link in the
  EPANET input file. The actual direction of flow in the link is
  not considered.
  
  @param index the link index.
  @return the from and to node indexes as a two items array.
  @throws EpanetException