Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Attribute.java
  *
  * Created on December 18, 2001, 10:55 AM
  */
 
 package javax.sdp;

An Attribute represents an a= fields contained within either a MediaDescription or a SessionDescription. An Attribute can be just an identity/name or a name-value pair. Here are some examples: a=recvonly identifies a rcvonly attribute with just a name a=rtpmap:0 PCMU/8000 identifies the media format 0 has having the value PCMU/8000. If a value is present, it must be preceeded by the : character.

Author(s):
deruelle
Version:
1.0
public interface Attribute extends Field {
    
    
Returns the name of this attribute

Returns:
a String identity.
Throws:
SdpParseException if the name is not well formatted.
    public String getName() throws SdpParseException;
    
    
Sets the id of this attribute.

Parameters:
name the string name/id of the attribute.
Throws:
SdpException if the name is null
    
    public void setName(String namethrows SdpException;
    
    
Determines if this attribute has an associated value.

Returns:
true if the attribute has a value.
Throws:
SdpParseException if the value is not well formatted.
    
    public boolean hasValue() throws SdpParseException;
    
    
Returns the value of this attribute.

Returns:
the value; null if the attribute has no associated value.
Throws:
SdpParseException if the value is not well formatted.
    
    public String getValue() throws SdpParseException;
    
    
Sets the value of this attribute.

Parameters:
value the - attribute value
Throws:
SdpException if the value is null.
    
    public void setValue(String valuethrows SdpException;
    
New to GrepCode? Check out our FAQ X