public final boolean isSecure(Socket sock) throws IllegalArgumentException {
  if (sock == null) {
    throw new IllegalArgumentException("Socket may not be null.");
  }
  if (sock.getClass() != Socket.class) {
    throw new IllegalArgumentException("Socket not created by this factory.");
  }
  if (sock.isClosed()) {
    throw new IllegalArgumentException("Socket is closed.");
  }
  return false;
}

public final boolean isSecure ( Socket sock ) throws IllegalArgumentException { if ( sock == null ) { throw new IllegalArgumentException ( "Socket may not be null." ) ; } if ( sock . getClass ( ) != Socket . class ) { throw new IllegalArgumentException ( "Socket not created by this factory." ) ; } if ( sock . isClosed ( ) ) { throw new IllegalArgumentException ( "Socket is closed." ) ; } return false ; }
checks whether a socket connection is secure . this factory creates plain socket connections which are not considered secure .
