code: public static String encode(Graph g) {
  		RegionGraphElement rge[] = g.getRegions();
  		RegionData data[] = new RegionData[rge.length];
  		for(int i = 0; i < data.length; i++) {
  			data[i] = rge[i].getData();
  		}
  		return encode(g.width, g.height, data);
  	}
docs: Convert a complete Graph into an opaque String that can later be
  re-assembled into a Graph object. Note that GraphConfiguration
  information is NOT encoded into the opaque String.
  @param g Graph to encode
  @return opaque String which can later be used with decode()