Package org.kapott.hbci.exceptions

Examples of org.kapott.hbci.exceptions.InvalidArgumentException


        int len=st.length();
        for (int i=0; i<len; i++) {
            char c=st.charAt(i);
            if (c<'0' || c>'9')
                throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXC_DTDIG_ONLY_DIGS",st));
        }

        for (int i=len; i<destlen; i++) {
            ret.insert(0,'0');
        }
View Full Code Here


        for (int i=0;i<len;i++) {
            char ch=st.charAt(i);

            if (ch>'9' || ch<'0')
                throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXC_DTDIG_ONLY_DIGS",st));
        }

        setContent(st,minsize,maxsize);
        res.delete(0, endidx);
    }
View Full Code Here

            break;
        case 'B':
            ret = st;
            break;
        default:
            throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg(
                    "EXC_DTBIN_NO_VALID_FORMAT",
                    Character.toString(format)));
        }

        return ret;
View Full Code Here

        for (int i=0; i<len; i++) {
            char ch = st.charAt(i);

            if (ch>'9' || ch<'0' || (i==0 && len!=1 && ch=='0'))
                throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXC_DTNUM_INV_CHAR",st));
        }

        setContent(st, minsize, maxsize);
        res.delete(0, endidx);
    }
View Full Code Here

                  (ch==0x5B) || (ch==0x5C) || (ch==0x5D) || (ch==0x7E))) {              // � � � �
               
                String msg=HBCIUtilsInternal.getLocMsg("EXC_DTAUS_INV_CHAR",Character.toString(ch));
                if (!HBCIUtilsInternal.ignoreError(null,"client.errors.ignoreWrongDataSyntaxErrors",msg)) {
                    // [willuhn 2012-03-06, BUG 1129] Exception als fatal markieren
                    InvalidArgumentException e = new InvalidArgumentException(msg);
                    e.setFatal(true);
                    throw e;
                }
               
                st=st.replace(ch,' ');
            }
View Full Code Here

        } else if (x.equals("840")) {
            ret="US";
        } else if (x.equals("978")) {
            ret="EU";
        } else {
            throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXC_DT_UNNKOWN_CTR",x));
        }

        return ret;
    }
View Full Code Here

        int len=st.length();
        if (len<minsize || (maxsize!=0 && len>maxsize)) {
            String msg=HBCIUtilsInternal.getLocMsg("EXC_DT_INV_STRINGLEN",new Object[] {
                                           st,Integer.toString(len),Integer.toString(minsize),Integer.toString(maxsize)});
            if (len==0 || !HBCIUtilsInternal.ignoreError(null,"client.errors.ignoreWrongDataLengthErrors",msg))
                throw new InvalidArgumentException(msg);
        }

        content=st;
    }
View Full Code Here

               erzeugt worden sein */
    public HBCIHandler(String hbciversion,HBCIPassport passport)
    {
        try {
            if (passport==null)
                throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXCMSG_PASSPORT_NULL"));
           
            if (hbciversion==null) {
                hbciversion=passport.getHBCIVersion();
            }
            if (hbciversion.length()==0)
                throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXCMSG_NO_HBCIVERSION"));

            this.kernel=new HBCIKernelImpl(this,hbciversion);
           
            this.passport=(HBCIPassportInternal)passport;
            this.passport.setParentHandlerData(this);
View Full Code Here

    public HBCIJob newJob(String jobname)
    {
        HBCIUtils.log("creating new job "+jobname,HBCIUtils.LOG_DEBUG);
       
        if (jobname==null || jobname.length()==0)
            throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXCMSG_EMPTY_JOBNAME"));
       
        HBCIJobImpl ret=null;
        String      className="org.kapott.hbci.GV.GV"+jobname;

        try {
View Full Code Here

    public HBCIJob newLowlevelJob(String gvname)
    {
        HBCIUtils.log("generating new lowlevel-job "+gvname,HBCIUtils.LOG_DEBUG);

        if (gvname==null || gvname.length()==0)
            throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXCMSG_EMPTY_JOBNAME"));

        HBCIJobImpl ret=new GVTemplate(gvname,this);
        return ret;
    }
View Full Code Here

TOP

Related Classes of org.kapott.hbci.exceptions.InvalidArgumentException

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.