⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settk_cl_zishiying_nd.java

📁 一个手机上的考试系统的有服务器源码
💻 JAVA
字号:
/* * Author :  胡家宝 * Date   :  2006-6-30 10:54:53 */  package WebExam;  import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.*; public class Settk_cl_zishiying_nd{	private int m_Zsy_id;	private int m_tk_cl_id;	private String m_tk_cl_nd;	private int m_tk_cl_tgnd;	private int m_tk_cl_tgnum;	public Settk_cl_zishiying_nd()	{	}	public Settk_cl_zishiying_nd(int Zsy_id,int tk_cl_id,String tk_cl_nd,int tk_cl_tgnd,int tk_cl_tgnum)	{		m_Zsy_id = Zsy_id;		m_tk_cl_id = tk_cl_id;		m_tk_cl_nd = tk_cl_nd;		m_tk_cl_tgnd = tk_cl_tgnd;		m_tk_cl_tgnum = tk_cl_tgnum;	}	public int getZsy_id()	{		return m_Zsy_id;	}	public void setZsy_id( int Zsy_id  )	{		m_Zsy_id = Zsy_id;	}	public int gettk_cl_id()	{		return m_tk_cl_id;	}	public void settk_cl_id( int tk_cl_id  )	{		m_tk_cl_id = tk_cl_id;	}	public String gettk_cl_nd()	{		return m_tk_cl_nd;	}	public void settk_cl_nd( String tk_cl_nd  )	{	if( tk_cl_nd == null )			tk_cl_nd= "default";		m_tk_cl_nd = tk_cl_nd;	}	public int gettk_cl_tgnd()	{		return m_tk_cl_tgnd;	}	public void settk_cl_tgnd( int tk_cl_tgnd  )	{		m_tk_cl_tgnd = tk_cl_tgnd;	}	public int gettk_cl_tgnum()	{		return m_tk_cl_tgnum;	}	public void settk_cl_tgnum( int tk_cl_tgnum  )	{		m_tk_cl_tgnum = tk_cl_tgnum;	}	//序列化	public byte[] serialize() throws IOException	{		ByteArrayOutputStream bout = new ByteArrayOutputStream();		DataOutputStream dout = new DataOutputStream(bout);		dout.writeInt( m_Zsy_id );		dout.writeInt( m_tk_cl_id );		dout.writeUTF( m_tk_cl_nd );		dout.writeInt( m_tk_cl_tgnd );		dout.writeInt( m_tk_cl_tgnum );		return bout.toByteArray();	}	//反序列化	public  void  deserialize(byte[] data) throws IOException	{		ByteArrayInputStream bin = new ByteArrayInputStream(data);		DataInputStream din = new DataInputStream(bin);		m_Zsy_id = din.readInt();		m_tk_cl_id = din.readInt();		m_tk_cl_nd = din.readUTF();		m_tk_cl_tgnd = din.readInt();		m_tk_cl_tgnum = din.readInt();		bin.close();		din.close();	}	public static boolean matches(byte[] data, String userName) throws IOException  	{ 		ByteArrayInputStream bais = new ByteArrayInputStream(data); 		DataInputStream dis = new DataInputStream(bais); 		try 		{ 			return (dis.readUTF()).equals(userName); 		} 		catch (IOException e) 		{ 			e.printStackTrace(); 			return false; 		} 	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -