code: public static void writeMultiPolygon(ByteWriter writer,
  			MultiPolygon multiPolygon) throws IOException {
  
  		writer.writeInt(multiPolygon.numPolygons());
  
  		for (Polygon polygon : multiPolygon.getPolygons()) {
  			writeGeometry(writer, polygon);
  		}
  	}
docs: Write a Multi Polygon
  
  @param writer
  @param multiPolygon
  @throws IOException