public StringBuilder encode(StringBuilder buffer) { if (userInfo != null) { userInfo.encode(buffer); buffer.append(AT); hostPort.encode(buffer); } else { hostPort.encode(buffer); } return buffer; }
/** Encode the body of this header (the stuff that follows headerName). A.K.A headerValue. */ protected String encodeBody() { StringBuffer encoding = new StringBuffer(); encoding.append(sentProtocol.encode()).append(SP).append(sentBy.encode()); if (!parameters.isEmpty()) { encoding.append(SEMICOLON).append(parameters.encode()); } if (comment != null) { encoding.append(SP).append(LPAREN).append(comment).append(RPAREN); } return encoding.toString(); }