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

📄 requesttitle.java

📁 我自己做的一个关于使用Ethereal抓包软件抓取SIP协议包后自己的协议分析软件
💻 JAVA
字号:
/*
 * RequestTitle.java
 *
 * Created on 2007年5月23日, 下午1:22
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package SIPTitle;

/**
 *
 * @author Administrator
 */
public class RequestTitle {
    
    private String requesttitle = null;
    private boolean flag = false;
    /** Creates a new instance of RequestTitle */
    public RequestTitle() {
    }
    
    public void setString(String string){
      
        int first = string.indexOf("sip:");   
        int last = string.lastIndexOf("SIP/2.0");
        if(first!=-1&&last!=-1&&last>first+7){       
            flag = true;
            requesttitle = string.substring(first,last+7);
        }
        else{
            flag = false;
            requesttitle = null;
        }
    }
    
    public boolean getVerify(){
        return flag;
    }

    
    public String getRequesttitle() {
        return requesttitle;
    }

}

⌨️ 快捷键说明

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