protected String getFullAuthority ( URI uri ) { String authority = uri . getAuthority ( ) ; if ( ! authority . contains ( ":" ) && uri . getPort ( ) > 0 ) { // Append port for complete authority authority = String . format ( "%s:%d" , uri . getAuthority ( ) , uri . getPort ( ) ) ; } return authority ; }
Gets full authority for a URL by appending port to the url authority .