question: public boolean isSecure ( Socket sock ) throws IllegalArgumentException { if ( sock == null ) { throw new IllegalArgumentException ( "Socket may not be null." ) ; } if ( ! ( sock instanceof SSLSocket ) ) { throw new IllegalArgumentException ( "Socket not created by this factory." ) ; } if ( sock . isClosed ( ) ) { throw new IllegalArgumentException ( "Socket is closed." ) ; } return true ; }
target:  Checks whether a socket connection is secure. This factory creates TLS/SSL socket connections which, by default, are considered secure. <br/> Derived classes may override this method to perform runtime checks, for example based on the cypher suite.