web.xml中的filterMina的底层依赖的主要是Ja(25)

电脑杂谈  发布时间:2019-03-27 09:08:04  来源:网络整理

matchCount=0;

buffer.clear();

ctx.setLength(length);

}

line++;

}elseif(line==4){

if(matchCount==Long.parseLong(length.split(":")[1]))

{

buffer.flip();

sms=buffer.getString(matchCount,cd);

ctx.setSms(sms);

//由于下面的break,这里需要调用else外面的两行代码

ctx.setMatchCount(matchCount);

ctx.setLine(line);

break;

}

}

ctx.setMatchCount(matchCount);

ctx.setLine(line);

}

if(ctx.getLine()==4

&&Long.parseLong(ctx.getLength().split(":")[1])==ctx

.getMatchCount()){

SmsObjectsmsObject=newSmsObject();

smsObject.setSender(sender.split(":")[1]);

smsObject.setReceiver(receiver.split(":")[1]);

smsObject.setMessage(sms);

out.write(smsObject);

ctx.reset();

returntrue;

}else{

returnfalse;

}

}

privateContextgetContext(IoSessionsession){

Contextcontext=(Context)session.getAttribute(CONTEXT);

if(context==null){

context=newContext();

session.setAttribute(CONTEXT,context);

}

returncontext;

}

privateclassContext{

privatefinalIoBufferinnerBuffer;

privateStringstatusLine="";

privateStringsender="";

privateStringreceiver="";

privateStringlength="";

privateStringsms="";

publicContext(){

innerBuffer=IoBuffer.allocate(100).setAutoExpand(true);

}

privateintmatchCount=0;

privateintline=0;

publicintgetMatchCount(){

returnmatchCount;

}

publicvoidsetMatchCount(intmatchCount){

this.matchCount=matchCount;

}

publicintgetLine(){

returnline;

}

publicvoidsetLine(intline){

this.line=line;

}

publicStringgetStatusLine(){

returnstatusLine;

}

publicvoidsetStatusLine(StringstatusLine){

this.statusLine=statusLine;

}

publicStringgetSender(){


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-93147-25.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...