String result = super.valueToString(value); int rLength = result.length();    if (rLength > maskLength) result = result.substring(0, maskLength);   result = convertValue(result, true); if (rLength < maskLength) return pad(result, rLength); return result;
String string = value != null ? value.toString() : ""; return convertValueToString(string);
  public String valueToString (Object value) throws ParseException  {    String result = super.valueToString(value);    int rLength = result.length();        // If value is longer than the mask, truncate it.  Note we may need to     // account for symbols that are more than one character long.    if (rLength > maskLength)      result = result.substring(0, maskLength);        // Verify the validity and convert to upper/lowercase as needed.    result = convertValue(result, true);            if (rLength < maskLength)      return pad(result, rLength);        return result;  }