mabstractresponsebodyrule.java
来自「httptunnel.jar httptunnel java 源码」· Java 代码 · 共 40 行
JAVA
40 行
package net.jumperz.app.MGuardian.rule;
import net.jumperz.net.MHttpResponse;
import net.jumperz.util.*;
import java.io.*;
import java.util.regex.*;
public abstract class MAbstractResponseBodyRule
extends MAbstractResponseRule
{
//--------------------------------------------------------------------------------
public boolean matchesResponse( MHttpResponse response, MResultCache resultCache )
{
boolean match = false;
try
{
if( response.hasBody() )
{
match = selectMatchesImpl( pattern, response );
match = ( match != negationFlag );
}
else
{
// if response has no body, always return false
match = false;
}
}
catch( IOException e )
{
e.printStackTrace();
}
resultCache.cacheResult( this, match );
return match;
}
//--------------------------------------------------------------------------------
public abstract boolean selectMatchesImpl( Pattern pattern, MHttpResponse response ) throws IOException;
//-----------------------------------------------------------------------------
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?