code: public static void writeCurvePolygon(ByteWriter writer,
  			CurvePolygon<?> curvePolygon) throws IOException {
  
  		writer.writeInt(curvePolygon.numRings());
  
  		for (Curve ring : curvePolygon.getRings()) {
  			writeGeometry(writer, ring);
  		}
  	}
docs: Write a Curve Polygon
  
  @param writer
  @param curvePolygon
  @throws IOException