public static String encode(LatLng[] path) {
    return encode(Arrays.asList(path));
  }
Encodes an array of LatLngs into an encoded path string.
src/main/java/com/google/maps/internal/PolylineEncoding.java