www.pudn.com > cmppNeu.rar > ActiveTest.java


package cmpp.v2_0; 
 
import java.util.Arrays; 
 
public class ActiveTest extends CMPP 
{ 
    private  final int commandId 		= CMPP.ID_CMPP_ACTIVE_TEST; 
    private	 final int commandLength 	= 0; 
     
	public ActiveTest()   { 
        super(CMPP.ID_CMPP_ACTIVE_TEST); 
    } 
    public ActiveTest(CMPP cmpp)  { 
        super(cmpp); 
    }   
     
	/** 
	 *  
	 */ 
	protected int parseBody() { 
		 
    	if( super.bodyLength < commandLength ) {	//length too short. 
    		return -1; 
    	} 
 
    	return 0; 
    } 
 
	/** 
	 *  
	 */ 
	protected int makeBody() { 
    	// make bodybytes 
    	super.bodyLength = commandLength;  
    	super.bodybytes  = new byte[super.bodyLength]; 
    	Arrays.fill(super.bodybytes,(byte)0); 
 
    	// make body 
    	return 0; 
	} 
	 
	public String toString() { 
		StringBuffer sb = new StringBuffer(); 
		return sb.toString(); 
	} 
 
}