/** Create and return a list of headers. *@param headers -- list of headers. *@throws ParseException -- if a parse exception occurs or a List * of that type of header is not alowed. *@return a List containing the headers. */ public java.util.List createHeaders(String headers) throws java.text.ParseException { if (headers == null) throw new NullPointerException("null arg!"); StringMsgParser smp = new StringMsgParser(); SIPHeader shdr = smp.parseSIPHeader(headers); if (shdr instanceof SIPHeaderList) return (SIPHeaderList) shdr; else throw new ParseException( "List of headers of this type is not allowed in a message", 0); }
SIPHeader sipHeader = smp.parseSIPHeader(headerText.trim()); if (sipHeader instanceof SIPHeaderList) { if (((SIPHeaderList) sipHeader).size() > 1) {