Package net.sourceforge.fullsync

Examples of net.sourceforge.fullsync.DataParseException


        index = token.indexOf("/");

        if (index > 0) {
          each = Integer.parseInt(token.substring(index + 1));
          if (each == 0) {
            throw new DataParseException(Messages.getString("CrontabPart.NeverUseExpressions")); //$NON-NLS-1$
          }

          token = token.substring(0, index);
        }

        if (token.equals("*")) {
          for (i = low; i < (bArray.length - offset); i += each) {
            bArray[i + offset] = true;
          }
          return each == 1;
        }

        index = token.indexOf(",");
        if (index > 0) {
          StringTokenizer tokenizer = new StringTokenizer(token, ",");
          while (tokenizer.hasMoreElements()) {
            parseToken(tokenizer.nextToken());
          }
          return false;
        }

        index = token.indexOf("-");
        if (index > 0) {
          int start = Integer.parseInt(token.substring(0, index));
          int end = Integer.parseInt(token.substring(index + 1));

          /*
           * if(bBeginInOne) {
           * start--;
           * end--;
           * }
           */
          for (int j = start; j <= end; j += each) {
            bArray[j + offset] = true;
          }
          return false;
        }

        int iValue = Integer.parseInt(token);
        /*
         * if(bBeginInOne) {
         * iValue--;
         * }
         */
        bArray[iValue + offset] = true;
        return false;
      }
      catch (Exception e) {
        throw new DataParseException(Messages.getString("CrontabPart.SomethingWasWrong") + token, e); //$NON-NLS-1$
      }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.fullsync.DataParseException

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.