|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jsdp.Key
public class Key
A Key represents an <k=<field value> field contained in a SDP message.
A SDP message may be used to convey encryption keys, if transported over a secure and trusted channel. Key fields has the form: <method>:<key>, but the key value is optional. The following methods are defined:
Field Summary | |
---|---|
static String |
BASE64
The base64 encryption method modifier |
static String |
CLEAR
The clear encryption method modifier |
protected String |
key
The encription key |
protected String |
method
The encryption method |
static String |
PROMPT
The prompt encryption method modifier |
static String |
URI
The uri encryption method modifier |
Fields inherited from interface net.sourceforge.jsdp.Field |
---|
ATTRIBUTE_FIELD, BANDWITH_FIELD, CONNECTION_FIELD, EMAIL_FIELD, END_OF_FIELD, INFORMATION_FIELD, KEY_FIELD, MEDIA_FIELD, ORIGIN_FIELD, PHONE_FIELD, REPEAT_TIME_FIELD, SESSION_NAME_FIELD, TIME_FIELD, TIMEZONE_FIELD, URI_FIELD, VERSION_FIELD |
Constructor Summary | |
---|---|
protected |
Key()
Creates a new Key. |
|
Key(String method,
String key)
Creates a new Key. |
Method Summary | |
---|---|
Object |
clone()
Returns a clone of this field. |
String |
getKey()
Returns the encryption key. |
String |
getMethod()
Returns the encryption method. |
char |
getType()
Returns the type character for the field. |
boolean |
hasKey()
Determines if the method has an associated key. |
static Key |
parse(String field)
Parse an input string and constructs the equivalent key field. |
void |
setKey(String key)
Sets the encryption key. |
void |
setMethod(String method)
Sets the encryption method. |
String |
toString()
Returns a string representation of the field. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String BASE64
public static final String CLEAR
public static final String PROMPT
public static final String URI
protected String method
protected String key
Constructor Detail |
---|
protected Key()
public Key(String method, String key) throws SDPException
method
- the encryption methodkey
- the encryption key
SDPException
- if the encryption method is not allowed, or the
encryption key is not valid for the specified methodMethod Detail |
---|
public static Key parse(String field) throws SDPParseException
field
- the string to parse
SDPParseException
- if an error occurs while parsingpublic Object clone()
clone
in interface Field
clone
in class Object
public String getKey()
public String getMethod()
public char getType()
getType
in interface Field
public boolean hasKey()
public void setKey(String key) throws SDPException
key
- the encryption key to set
SDPException
- if the key is not validpublic void setMethod(String method) throws SDPException
method
- the encryption method to set
SDPException
- if the method is not allowed or nullpublic String toString()
toString
in interface Field
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |