FileDocCategorySizeDatePackage
ProtoVersionField.javaAPI DocphoneME MR2 API (J2ME)2959Wed May 02 18:00:42 BST 2007gov.nist.javax.sdp.fields

ProtoVersionField

public class ProtoVersionField extends SDPField
Proto version field of SDP announce.
version
JSR141-PUBLIC-REVIEW (subject to change). This code is in the public domain.

Fields Summary
protected int
protoVersion
Protocol version.
Constructors Summary
public ProtoVersionField()
Default constructor.

	super(PROTO_VERSION_FIELD); 
    
Methods Summary
public java.lang.Objectclone()
Copies the current instance.

return
the copy of this object

	ProtoVersionField retval = new ProtoVersionField();
	retval.protoVersion = this.protoVersion;
	return retval;
    
public java.lang.Stringencode()
Gets the string encoded version of this object.

return
encoded string of object contents
since
v1.0

	return PROTO_VERSION_FIELD + protoVersion + Separators.NEWLINE;
    
public intgetProtoVersion()
Gets the protocol version number.

return
the protocol version number

	return protoVersion;
    
public intgetVersion()
Returns the version number.

throws
SdpParseException if a parsing error occurs
return
the version number

	return getProtoVersion();
    
public voidsetProtoVersion(int pv)
Sets the protocol version member.

param
pv the new protocol version number

	protoVersion = pv;
    
public voidsetVersion(int value)
Sets the version number.

param
value the new version value.
throws
SdpException if the value is less than 0

	if (value < 0)
	    throw new SdpException("The value is < 0");
	else setProtoVersion(value);