} else {     }
}
	public String encode() {		StringBuffer encoding = new StringBuffer();		// Synchronization added because of concurrent modification exception		// noticed by Lamine Brahimi.		synchronized (this.headers) {			ListIterator it = this.headers.listIterator();			while (it.hasNext()) {				SIPHeader siphdr = (SIPHeader) it.next();				if (!(siphdr instanceof ContentLength))					encoding.append(siphdr.encode());			}		}		encoding.append(contentLengthHeader.encode()).append(NEWLINE);		if (this.messageContentObject != null) {			String mbody = this.getContent().toString();			// encoding.append(SIPHeaderNames.CONTENT_LENGTH + COLON +			// SP + mbody.length() + NEWLINE);			// encoding.append(NEWLINE);			encoding.append(mbody);		} else if (			this.messageContent != null || this.messageContentBytes != null) {			String content = null;			try {				if (messageContent != null)					content = messageContent;				else					content = new String(messageContentBytes, DEFAULT_ENCODING);			} catch (UnsupportedEncodingException ex) {				content = "";			}			// Add the content-length header			// encoding.append(SIPHeaderNames.CONTENT_LENGTH + COLON +			// SP + content.length() + NEWLINE);			// Append the content			//encoding.append(NEWLINE);			encoding.append(content);		} else {			// Message content does not exist.			// encoding.append(SIPHeaderNames.CONTENT_LENGTH + COLON +			// SP + '0' + NEWLINE);			//encoding.append(NEWLINE);		}		return encoding.toString();	}