📄 mabstractresponsebodyrule.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -