예제 #1
0
 public static int calcCont(String[] props) {
   String lim = ChannelUtil.getPropertyValue(props, "continue_limit");
   int ret = Channels.DeafultContLim;
   if (!ChannelUtil.empty(lim)) {
     try {
       ret = Integer.parseInt(lim);
     } catch (Exception e) {
     }
   }
   if (ret < 0) ret = Channels.DeafultContLim;
   return ret;
 }
예제 #2
0
 public static int[] getNameIndex(String[] prop) {
   try {
     String x = ChannelUtil.getPropertyValue(prop, "name_index");
     if (!empty(x)) {
       String[] idx = x.split("\\+");
       int[] res = new int[idx.length];
       for (int i = 0; i < idx.length; i++) {
         int j = new Integer(idx[i]).intValue();
         if (j > 0) res[i] = j;
       }
       return res;
     }
   } catch (Exception e) {
     Channels.debug("excep " + e);
   }
   return null;
 }