code: @Override
  	public String encodeAsString() throws IOException {
  		final int size = messages.size();
  		if(size == 0) return "";
  
  		StringBuilder sb = new StringBuilder();
  		sb.append(size).append(DELIMITER);
  		int count = 0;
  		for(Message message : messages) {
  			count++;
  			String str = message.encodeAsString();
  			sb
  				.append(message.getMessageType().getTypeChar())
  				.append(str.length())
  				.append(DELIMITER)
  				.append(str)
  			;
  		}
  		if(count != size) throw new ConcurrentModificationException();
  		return sb.toString();
  	}
docs: Encodes the messages into a single string.