public static StringBuilder computeMessageBuffer ( HttpResponse response ) { StringBuilder builder = new StringBuilder ( ) ; int statusCode = response . getStatusCode ( ) ; if ( statusCode != 0 ) { builder . append ( statusCode ) ; } String statusMessage = response . getStatusMessage ( ) ; if ( statusMessage != null ) { if ( statusCode != 0 ) { builder . append ( ' ' ) ; } builder . append ( statusMessage ) ; } return builder ; }
Returns an exception message string builder to use for the given HTTP response .