深海大战手机游戏

源代码在线查看: findrecord.java

软件大小: 356 K
上传用户: pipiooxx
关键词: 手机游戏
下载地址: 免注册下载 普通下载 VIP

相关代码

				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;
				    }
				}
							

相关资源