code: public static CurvePolygon<Curve> readCurvePolygon(ByteReader reader,
  			boolean hasZ, boolean hasM) {
  
  		CurvePolygon<Curve> curvePolygon = new CurvePolygon<Curve>(hasZ, hasM);
  
  		int numRings = reader.readInt();
  
  		for (int i = 0; i < numRings; i++) {
  			Curve ring = readGeometry(reader, Curve.class);
  			curvePolygon.addRing(ring);
  
  		}
  
  		return curvePolygon;
  	}
docs: Read a Curve Polygon
  
  @param reader
  @param hasZ
  @param hasM
  @return curve polygon