code: private void addChannel(Channel chan) {
          if (channelList == null) {
              channelList = new Channel[1];
              channelList[0] = chan;
          } else {
              Channel[] oldList = channelList;
              channelList = new Channel[oldList.length + 1];
              System.arraycopy(oldList, 0, channelList, 0, oldList.length);
              channelList[oldList.length] = chan;
          }
      }
docs: Add a channel to the channel list to be searched.
  
  @param chan