code: public static int sld2awtCap( String sldCap ) {
          if (sldCap.equals("") || sldCap.equals(lineCapNames[1])) {
              return BasicStroke.CAP_BUTT;
          } else if (sldCap.equals(lineCapNames[2])) {
              return BasicStroke.CAP_ROUND;
          } else if (sldCap.equals(lineCapNames[3])) {
              return BasicStroke.CAP_SQUARE;
          } else {
              throw new IllegalArgumentException("unsupported line cap");
          }
      }
docs: Convert a sld line cap definition to the java awt value.
  
  @param sldCap the sld cap string.
  @return the awt value.