Examples of maxLength()


Examples of org.jcodings.Encoding.maxLength()

    public final RubyString catAscii(byte[]bytes, int p, int len) {
        Encoding enc = value.getEncoding();
        if (enc.isAsciiCompatible()) {
            cat(bytes, p, len, enc, CR_7BIT);
        } else {
            byte buf[] = new byte[enc.maxLength()];
            int end = p + len;
            while (p < end) {
                int c = bytes[p];
                int cl = codeLength(getRuntime(), enc, c);
                enc.codeToMbc(c, buf, 0);
View Full Code Here

Examples of org.jcodings.Encoding.maxLength()

    public final RubyString catAscii(byte[]bytes, int p, int len) {
        Encoding enc = value.getEncoding();
        if (enc.isAsciiCompatible()) {
            cat(bytes, p, len, enc, CR_7BIT);
        } else {
            byte buf[] = new byte[enc.maxLength()];
            int end = p + len;
            while (p < end) {
                int c = bytes[p];
                int cl = codeLength(getRuntime(), enc, c);
                enc.codeToMbc(c, buf, 0);
View Full Code Here

Examples of org.jcodings.Encoding.maxLength()

    public final RubyString catAscii(byte[]bytes, int ptr, int ptrLen) {
        Encoding enc = value.getEncoding();
        if (enc.isAsciiCompatible()) {
            EncodingUtils.encCrStrBufCat(getRuntime(), this, new ByteList(bytes, ptr, ptrLen), enc, CR_7BIT, null);
        } else {
            byte buf[] = new byte[enc.maxLength()];
            int end = ptr + ptrLen;
            while (ptr < end) {
                int c = bytes[ptr];
                int len = codeLength(getRuntime(), enc, c);
                EncodingUtils.encMbcput(c, buf, 0, enc);
View Full Code Here

Examples of org.jcodings.specific.UTF8Encoding.maxLength()

                       qpencode(result, lCurElemString, occurrences);
                    }
                    break;
                case 'U' :
                    UTF8Encoding enc = UTF8Encoding.INSTANCE;
                    byte[] packedBytes = new byte[enc.maxLength() * occurrences];
                    int index = 0;
                   
                    while (occurrences-- > 0) {
                        if (listSize-- <= 0) {
                           throw runtime.newArgumentError(sTooFew);
View Full Code Here

Examples of org.lwjgl.util.generator.opengl.GLreturn.maxLength()

      throw new RuntimeException("The parameter specified in @GLreturn is not annotated with @OutParameter in method: " + method);

    if ( param.getAnnotation(Check.class) != null )
      throw new RuntimeException("The parameter specified in @GLreturn is annotated with @Check in method: " + method);

    if ( param.getAnnotation(GLchar.class) != null && Utils.getJavaType(param.getType()).equals(ByteBuffer.class) && string_annotation.maxLength().length() == 0 )
      throw new RuntimeException("The @GLreturn annotation is missing a maxLength parameter in method: " + method);

    return true;
  }
View Full Code Here

Examples of org.lwjgl.util.generator.opengl.GLreturn.maxLength()

      throw new RuntimeException("The parameter specified in @GLreturn is not annotated with @OutParameter in method: " + method);

    if ( param.getAnnotation(Check.class) != null )
      throw new RuntimeException("The parameter specified in @GLreturn is annotated with @Check in method: " + method);

    if ( param.getAnnotation(GLchar.class) != null && Utils.getJavaType(param.getType()).equals(ByteBuffer.class) && string_annotation.maxLength().length() == 0 )
      throw new RuntimeException("The @GLreturn annotation is missing a maxLength parameter in method: " + method);

    return true;
  }
View Full Code Here

Examples of org.slim3.controller.validator.Validators.maxlength()

            }
            Validators v = getValidator();
            v.add(
                "uid",
                v.required(),
                v.maxlength(VALID_MAX_UID),
                v.minlength(VALID_MIN_UID));
            if (v.validate()) {
                Transaction tx= Datastore.beginTransaction();
                User user =
                    service.put(tx, uid, name, mail, phone, zipcode, address);
View Full Code Here

Examples of org.slim3.controller.validator.Validators.maxlength()

                }
                v.add(
                    "newPassword",
                    v.required(),
                    v.minlength(VALID_MIN_PASSWD),
                    v.maxlength(VALID_MAX_PASSWD),
                    new StringValidator(oldPassword, true));
                v.add("newPassword2", v.required(), new StringValidator(
                    newPassword));

                if (v.validate()) {
View Full Code Here

Examples of org.slim3.controller.validator.Validators.maxlength()

            if (checkAdmin()) {
                Validators v = new Validators(request);
                v.add(
                    "uid",
                    v.required(),
                    v.maxlength(VALID_MAX_UID),
                    v.minlength(VALID_MIN_UID));
                v.add("name", v.required());
                v.add("mail", v.required(), v.regexp(VALID_PAT_MAILADDR));
                if (v.validate()) {
                    if (!validateInsertUser(uid)) {
View Full Code Here

Examples of org.slim3.controller.validator.Validators.maxlength()

        v.add(
            "startWeek",
            v.required(),
            v.integerType(),
            v.longRange(START_WEEK_MIN, START_WEEK_MAX));
        v.add("keyword", v.maxlength(KEYWORD_MAX_LENGTH));
        if (!v.validate()) {
            response.setStatus(UNAUTHORIZED);
            Errors errors = v.getErrors();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < errors.size(); i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.