code: public static Geometry split(Geometry geomA, Geometry geomB) throws SQLException {
          if(geomA == null||geomB == null){
              return null;
          }
          if (geomA instanceof Polygon) {
              return splitPolygonWithLine((Polygon) geomA, (LineString) geomB);
          } 
          else if(geomA instanceof MultiPolygon){
              return splitMultiPolygonWithLine((MultiPolygon)geomA, (LineString) geomB);
          }
          else if (geomA instanceof LineString) {
              if (geomB instanceof LineString) {
                  return splitLineStringWithLine((LineString) geomA, (LineString) geomB);
              } else if (geomB instanceof Point) {
                  return splitLineWithPoint((LineString) geomA, (Point) geomB, PRECISION);
              }
          } else if (geomA instanceof MultiLineString) {
              if (geomB instanceof LineString) {
                  return splitMultiLineStringWithLine((MultiLineString) geomA, (LineString) geomB);
              } else if (geomB instanceof Point) {
                  return splitMultiLineStringWithPoint((MultiLineString) geomA, (Point) geomB, PRECISION);
              }
          }
          throw new SQLException("Split a " + geomA.getGeometryType() + " by a " + geomB.getGeometryType() + " is not supported.");
      }
docs: Split a geometry a according a geometry b. Supported operations are :
  split a line by a line a line by a point a polygon by a line.
  
  A default tolerance of 10E-6 is used to snap the cutter point.
  
  @param geomA
  @param geomB
  @return
  @throws SQLException