Ejemplo n.º 1
0
 private boolean checkSocket(Socket s) {
   int l = deny.size();
   byte address[] = s.getInetAddress().getAddress();
   for (int i = 0; i < l; i++) {
     AddressMatcher match = (AddressMatcher) deny.elementAt(i);
     if (match.matches(address)) return false;
   }
   l = accept.size();
   for (int i = 0; i < l; i++) {
     AddressMatcher match = (AddressMatcher) accept.elementAt(i);
     if (match.matches(address)) return true;
   }
   return false;
 }