Beispiel #1
0
 public static String extension(String fileName, boolean stripDot) {
   if (ChannelUtil.empty(fileName)) return null;
   int pos = fileName.lastIndexOf('.');
   if ((pos > 0) && (pos < fileName.length() - 1))
     return fileName.substring(pos + (stripDot ? 1 : 0));
   return null;
 }
Beispiel #2
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;
 }