深海大战手机游戏
源代码在线查看: findrecord.java
package shipwar;
import javax.microedition.rms.RecordFilter;
public class FindRecord implements RecordFilter {
private String name=null;
private String name1=null;
public FindRecord(String name) {
this.name=name;
}
/**
* matches
*
* @param byteArray byte[]
* @return boolean
* @todo Implement this javax.microedition.rms.RecordFilter method
*/
public boolean matches(byte[] byteArray) {
StringDeal stringdeal=new StringDeal();
try{
stringdeal=StringDeal.deserialize(byteArray);
name1=stringdeal.getname();
stringdeal=null;
}catch(Exception e){
System.out.println("解析失败");
}
if(name!=null)
if(this.name.equals(name1))
return true;
return false;
}
}