⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sipvialist.java

📁 Java SIP
💻 JAVA
字号:
/* * This file was derived from libdissipate, an open source SIP library. The original file  * was modified on 1/23/2001.  Please see * http://www.div8.net/dissipate for more information. * * Copyright (c) 2000 Billy Biggs <bbiggs@div8.net> * * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. *  * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public * License for more details. *  * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB.  If not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * *//** * class SipViaList *  * This code has been generated using C2J++ * C2J++ is based on Chris Laffra's C2J (laffra@watson.ibm.com) * Read general disclaimer distributed with C2J++ before using this code * For information about C2J++, send mail to Ilya_Tilevich@ibi.com */package org.mitre.jsip;import java.util.*;public class SipViaList extends ArrayList{    /**     * SipViaList     */    public SipViaList()    {    }    /**     * getViaList     * @return String     */    public String getViaList()    {	String list = (size() > 0) ? "" : null;	for( ListIterator it = this.listIterator(); it.hasNext();  ) {	    SipVia svia = (SipVia)it.next();		list += SipHeader.getHeaderString( SipHeader.Via ) + ": " + svia.via() + "\r\n";	}	return list;    }    /**     * insertTopmostVia     * @param newtop     */    public void insertTopmostVia(SipVia newtop)    {	this.add( 0, newtop );    }        /**     * parseVia     * @param via     */    public void parseVia(String via)    {	String inputline;	String curvia;	inputline = via.trim();	while( inputline != null ) {	    if( inputline.indexOf( ',' ) >= 0 ) {		curvia = inputline.substring( 0, inputline.indexOf( ',' ) - 1 );		this.add( new SipVia( curvia ) );		inputline = inputline.substring( inputline.indexOf( ',' ) + 1 );		inputline.trim();	    } else {		this.add( new SipVia( inputline ) );		inputline = null;	    }	}    }    /**     * getTopmostVia     * @return SipVia&     */    public SipVia getTopmostVia()    {	return (SipVia)this.get( 0 );    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -