code: public static Geometry computePositiveRingBuffer(Geometry geom, double bufferDistance,
              int numBuffer, BufferParameters bufferParameters, boolean doDifference) throws SQLException {
          Polygon[] buffers = new Polygon[numBuffer];        
          if (geom instanceof Polygon) {
              //Work arround to manage polygon with hole
              geom = geom.getFactory().createPolygon(((Polygon) geom).getExteriorRing().getCoordinateSequence());
          }
          Geometry previous = geom;
          double distance = 0;
          for (int i = 0; i < numBuffer; i++) {
              distance += bufferDistance;
              Geometry newBuffer = runBuffer(geom, distance, bufferParameters);
              if (doDifference) {
                  buffers[i] = (Polygon) newBuffer.difference(previous);
              } else {
                  buffers[i] = (Polygon) newBuffer;
              }
              previous = newBuffer;
          }
          return geom.getFactory().createMultiPolygon(buffers);
      }
docs: Compute a ring buffer with a positive offset
  
  @param geom
  @param bufferDistance
  @param numBuffer
  @param bufferParameters
  @param doDifference
  @return
  @throws SQLException