rebuild the host : port string , including brackets if necessary . concode_field_sep Pattern BRACKET_PATTERN concode_elem_sep int port concode_elem_sep int NO_PORT concode_elem_sep String host concode_field_sep HostAddress withDefaultPort concode_elem_sep HostAddress fromUri concode_elem_sep boolean hasPort concode_elem_sep int getPort concode_elem_sep String getHostText concode_elem_sep HostAddress fromParts concode_elem_sep InetAddress toInetAddress concode_elem_sep int hashCode concode_elem_sep boolean equals concode_elem_sep HostAddress fromString concode_elem_sep boolean isValidPort concode_elem_sep int getPortOrDefault
String function ( ) { StringBuilder loc0 = new StringBuilder ( host . length ( ) + 7 ) ; if ( host . indexOf ( ':' ) >= 0 ) { loc0 . append ( '[' ) . append ( host ) . append ( ']' ) ; } else { loc0 . append ( host ) ; } if ( hasPort ( ) ) { loc0 . append ( ':' ) . append ( port ) ; } return loc0 . toString ( ) ; }