Package java.util

Examples of java.util.UnknownFormatConversionException


    int idx;
    // If there are any '%' in the given string, we got a bad format
    // specifier.
    if ((idx = s.indexOf('%')) != -1) {
      char c = (idx > s.length() - 2 ? '%' : s.charAt(idx + 1));
      throw new UnknownFormatConversionException(String.valueOf(c));
    }
  }
View Full Code Here


  private char conversion(String s) {
    c = s.charAt(0);
    if (!dt) {
      if (!Conversion.isValid(c))
        throw new UnknownFormatConversionException(String.valueOf(c));
      if (Character.isUpperCase(c))
        f.add(Flags.UPPERCASE);
      c = Character.toLowerCase(c);
      if (Conversion.isText(c))
        index = -2;
View Full Code Here

    else if (Conversion.isFloat(c))
      checkFloat();
    else if (Conversion.isText(c))
      checkText();
    else
      throw new UnknownFormatConversionException(String.valueOf(c));
  }
View Full Code Here

  private void checkDateTime() throws FormatFlagsConversionMismatchException {
    if (precision != -1)
      throw new IllegalFormatPrecisionException(precision);
    if (!DateTime.isValid(c))
      throw new UnknownFormatConversionException("t" + c);
    checkBadFlags(Flags.ALTERNATE, Flags.PLUS, Flags.LEADING_SPACE,
        Flags.ZERO_PAD, Flags.GROUP, Flags.PARENTHESES);
    // '-' requires a width
    if (width == -1 && f.contains(Flags.LEFT_JUSTIFY))
      throw new MissingFormatWidthException(toString());
View Full Code Here

    int idx;
    // If there are any '%' in the given string, we got a bad format
    // specifier.
    if ((idx = s.indexOf('%')) != -1) {
      char c = (idx > s.length() - 2 ? '%' : s.charAt(idx + 1));
      throw new UnknownFormatConversionException(String.valueOf(c));
    }
  }
View Full Code Here

  private char conversion(String s) {
    c = s.charAt(0);
    if (!dt) {
      if (!Conversion.isValid(c))
        throw new UnknownFormatConversionException(String.valueOf(c));
      if (Character.isUpperCase(c))
        f.add(Flags.UPPERCASE);
      c = Character.toLowerCase(c);
      if (Conversion.isText(c))
        index = -2;
View Full Code Here

    else if (Conversion.isFloat(c))
      checkFloat();
    else if (Conversion.isText(c))
      checkText();
    else
      throw new UnknownFormatConversionException(String.valueOf(c));
  }
View Full Code Here

  private void checkDateTime() throws FormatFlagsConversionMismatchException {
    if (precision != -1)
      throw new IllegalFormatPrecisionException(precision);
    if (!DateTime.isValid(c))
      throw new UnknownFormatConversionException("t" + c);
    checkBadFlags(Flags.ALTERNATE, Flags.PLUS, Flags.LEADING_SPACE,
        Flags.ZERO_PAD, Flags.GROUP, Flags.PARENTHESES);
    // '-' requires a width
    if (width == -1 && f.contains(Flags.LEFT_JUSTIFY))
      throw new MissingFormatWidthException(toString());
View Full Code Here

                break;
            case GCC:
                ret = gccCredentialConverter.convert(json);
                break;
            default:
                throw new UnknownFormatConversionException(String.format("The cloudPlatform '%s' is not supported.", json.getCloudPlatform()));
        }
        return ret;
    }
View Full Code Here

                break;
            case GCC:
                ret = gccCredentialConverter.convert((GccCredential) credential);
                break;
            default:
                throw new UnknownFormatConversionException(String.format("The cloudPlatform '%s' is not supported.", credential.getCloudPlatform()));
        }
        return ret;
    }
View Full Code Here

TOP

Related Classes of java.util.UnknownFormatConversionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.