code: public ActiveTunnel[] getLocalForwardingTunnels(String key)
  			throws IOException {
  
  		if (outgoingtunnels.containsKey(key)) {
  			Vector<ActiveTunnel> v = outgoingtunnels.get(key);
  			ActiveTunnel[] t = new ActiveTunnel[v.size()];
  			v.copyInto(t);
  			return t;
  		}
  
  		if (!socketlisteners.containsKey(key)) {
  			throw new IOException(key
  					+ " is not a valid local forwarding configuration");
  		}
  
  		return new ActiveTunnel[] {};
  	}
docs: Get the active tunnels for a local forwarding listener.
  
  @param key
  @return ActiveTunnel[]
  @throws IOException