Package org.kapott.hbci.exceptions

Examples of org.kapott.hbci.exceptions.InvalidArgumentException


        String ret;
       
        try {
            ret=DateFormat.getDateInstance(DateFormat.SHORT, HBCIUtils.getLocale()).format(date);
        } catch (Exception e) {
            throw new InvalidArgumentException(date.toString());
        }
       
        return ret;
    }
View Full Code Here


        Date ret;
       
        try {
            ret=DateFormat.getDateInstance(DateFormat.SHORT, HBCIUtils.getLocale()).parse(date);
        } catch (Exception e) {
            throw new InvalidArgumentException(date);
        }
       
        return ret;
    }
View Full Code Here

        String ret;
       
        try {
            ret=DateFormat.getTimeInstance(DateFormat.SHORT, HBCIUtils.getLocale()).format(date);
        } catch (Exception e) {
            throw new InvalidArgumentException(date.toString());
        }
       
        return ret;
    }
View Full Code Here

        Date ret;
       
        try {
            ret=DateFormat.getTimeInstance(DateFormat.SHORT, HBCIUtils.getLocale()).parse(date);
        } catch (Exception e) {
            throw new InvalidArgumentException(date);
        }
       
        return ret;
    }
View Full Code Here

        String ret;
       
        try {
            ret=DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, HBCIUtils.getLocale()).format(date);
        } catch (Exception e) {
            throw new InvalidArgumentException(date.toString());
        }
       
        return ret;
    }
View Full Code Here

            if (time!=null)
                ret=DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT,HBCIUtils.getLocale()).parse(date+" "+time);
            else
                ret=DateFormat.getDateInstance(DateFormat.SHORT,HBCIUtils.getLocale()).parse(date);
        } catch (Exception e) {
            throw new InvalidArgumentException(date+" / "+time);
        }
       
        return ret;
    }
View Full Code Here

    public static Date string2DateISO(String st)
    {
        try {
            return new SimpleDateFormat("yyyy-MM-dd").parse(st);
        } catch (ParseException e) {
            throw new InvalidArgumentException(st);
        }
    }
View Full Code Here

    public static Date string2TimeISO(String st)
    {
        try {
            return new SimpleDateFormat("HH:mm:ss").parse(st);
        } catch (ParseException e) {
            throw new InvalidArgumentException(st);
        }
    }
View Full Code Here

        @param time eine Uhrzeit in der ISO-Darstellung (darf auch <code>null</code> sein)
        @return ein entsprechendes Datumsobjekt */
    public static Date strings2DateTimeISO(String date, String time)
    {
        if (date==null) {
      throw new InvalidArgumentException("*** date must not be null");
  }

        Date result;
        try {
      if (time!=null) {
                result=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(date+" "+time);
      } else {
                result=new SimpleDateFormat("yyyy-MM-dd").parse(date);
      }
        } catch (ParseException e) {
            throw new InvalidArgumentException(date+" / "+time);
        }
       
        return result;
    }
View Full Code Here

     extends SyntaxAN
{
    private static String check(String x)
    {
        if (!x.equals("J") && !x.equals("N"))
            throw new InvalidArgumentException(HBCIUtilsInternal.getLocMsg("EXC_DTJN_ONLY_JN"));
        return x;
    }
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.