📄 respondtitle.java
字号:
/*
* RespondTitle.java
*
* Created on 2007年5月23日, 下午1:16
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package SIPTitle;
import java.util.*;
/**
*
* @author Administrator
*/
public class RespondTitle {
private String responsdtitle = null;
boolean flag = false;
/** Creates a new instance of RespondTitle */
public RespondTitle() {
}
public void setString(String string){
String str = string.toUpperCase();
int first= str.indexOf("SIP/2.0");
try{
String a = str.substring(first+8,first+11);
int num = Integer.parseInt(a);
if(99<num&&num<700){
flag = true;
responsdtitle = str.substring(first);
}
}catch(NumberFormatException e){
flag = false;
responsdtitle = null;
}catch(StringIndexOutOfBoundsException ee){
flag = false;
responsdtitle = null;
}
}
public boolean getVerify(){
return flag;
}
public String getResponsdtitle(){
return responsdtitle;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -