public static boolean isLikelyChannel(String word){
  boolean result=false;
  if (word != null) {
    RaptorStringTokenizer tok=new RaptorStringTokenizer(word,CHANNEL_STRIP_CHARS,true);
    if (tok.hasMoreTokens()) {
      String current=tok.nextToken();
      try {
        int channel=Integer.parseInt(current);
        return channel >= 0 && channel <= 255;
      }
 catch (      NumberFormatException nfe) {
        if (tok.hasMoreTokens()) {
          try {
            current=tok.nextToken();
            int channel=Integer.parseInt(current);
            return channel >= 0 && channel <= 255;
          }
 catch (          NumberFormatException nfe2) {
            if (tok.hasMoreTokens()) {
              try {
                current=tok.nextToken();
                int channel=Integer.parseInt(current);
                return channel >= 0 && channel <= 255;
              }
 catch (              NumberFormatException nfe3) {
                if (tok.hasMoreTokens()) {
                  try {
                    current=tok.nextToken();
                    int channel=Integer.parseInt(current);
                    return channel >= 0 && channel <= 255;
                  }
 catch (                  NumberFormatException nfe4) {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return result;
}

public static boolean isLikelyChannel ( String word ) { boolean result = false ; if ( word != null ) { RaptorStringTokenizer tok = new RaptorStringTokenizer ( word , CHANNEL_STRIP_CHARS , true ) ; if ( tok . hasMoreTokens ( ) ) { String current = tok . nextToken ( ) ; try { int channel = Integer . parseInt ( current ) ; return channel >= 0 && channel <= 255 ; } catch ( NumberFormatException nfe ) { if ( tok . hasMoreTokens ( ) ) { try { current = tok . nextToken ( ) ; int channel = Integer . parseInt ( current ) ; return channel >= 0 && channel <= 255 ; } catch ( NumberFormatException nfe2 ) { if ( tok . hasMoreTokens ( ) ) { try { current = tok . nextToken ( ) ; int channel = Integer . parseInt ( current ) ; return channel >= 0 && channel <= 255 ; } catch ( NumberFormatException nfe3 ) { if ( tok . hasMoreTokens ( ) ) { try { current = tok . nextToken ( ) ; int channel = Integer . parseInt ( current ) ; return channel >= 0 && channel <= 255 ; } catch ( NumberFormatException nfe4 ) { } } } } } } } } } return result ; }
removes the ics channel wrapping around a specified channel word returning only the channel number . returns - 1 if the specified word is not a channel .
