public SortedMap<Long, Boolean> berecheneZustandsWechselVonBis(Long von, Long bis)
  {
    // TODO Auto-generated method stub
    Calendar cal1 = new GregorianCalendar();
    cal1.setTimeInMillis(von);
    Calendar cal2 = new GregorianCalendar();
    cal2.setTimeInMillis(bis);

    SimpleDateFormat df = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss,SSS");

    SortedMap<Long, Boolean> tmp = new TreeMap<Long, Boolean>();
    SortedMap<Long, Boolean> map = new TreeMap<Long, Boolean>();

    for (int i = cal1.get(Calendar.YEAR); i < cal2.get(Calendar.YEAR) + 1; i++)
    {

      if (cal2.get(Calendar.YEAR) - cal1.get(Calendar.YEAR) > 0)
      {

        try
        {
          Date anf = df.parse("01.01." + i + " 00:00:00,000");
          Date end = df.parse("31.12." + i + " 23:59:59,999");

          if (i == cal1.get(Calendar.YEAR))
          {

            map = berechneZustandsWechsel(von, end.getTime(), i);
            Date d = new Date();
            d.setTime(von);

          }
          else if (i == cal2.get(Calendar.YEAR))
          {

            map = berechneZustandsWechsel(anf.getTime(), bis, i);
            Date d = new Date();
            d.setTime(bis);

          }
          else
          {

            map = berechneZustandsWechsel(anf.getTime(), end.getTime(), i);

          }

        }
        catch (ParseException e)
        {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }

      }
      else
      {

        map = berechneZustandsWechsel(von, bis, i);

      }

      if (map != null)
      {
        // tmp.putAll(map);
        for (Map.Entry<Long, Boolean> me : map.entrySet())
        {
          if (me.getKey() >= von && me.getKey() <= bis)
            tmp.put(me.getKey(), me.getValue());
        }
      }

    }

    // tmp = korrigiereErgebnis(von, bis, tmp);

    return tmp;
  }