01: /**
02: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
03: * Unpublished - rights reserved under the Copyright Laws of the United States.
04: * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
05: * Copyright © 2005 BEA Systems, Inc. All rights reserved.
06: *
07: * Use is subject to license terms.
08: *
09: * This distribution may include materials developed by third parties.
10: *
11: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: *
13: * Module Name : JSIP Specification
14: * File Name : MediaType.java
15: * Author : Phelim O'Doherty
16: *
17: * HISTORY
18: * Version Date Author Comments
19: * 1.1 08/10/2002 Phelim O'Doherty
20: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: */package javax.sip.header;
22:
23: import java.text.ParseException;
24:
25: /**
26: * This interface represents media type methods for any header that contain
27: * content type and content sub-type values.
28: *
29: * @see AcceptHeader
30: * @see ContentTypeHeader
31: *
32: * @author BEA Systems, NIST
33: * @version 1.2
34: */
35:
36: public interface MediaType {
37:
38: /**
39: * Sets value of media type of Header with Content Type.
40: *
41: * @param contentType - the new string value of the content type
42: * @throws ParseException which signals that an error has been reached
43: * unexpectedly while parsing the contentType value.
44: */
45: public void setContentType(String contentType)
46: throws ParseException;
47:
48: /**
49: * Gets media type of Header with Content type.
50: *
51: * @return media type of Header with Content type.
52: */
53: public String getContentType();
54:
55: /**
56: * Sets value of media subtype of Header with Content sub-type.
57: *
58: * @param contentSubType - the new string value of the content sub-type.
59: * @throws ParseException which signals that an error has been reached
60: * unexpectedly while parsing the contentSubType value.
61: */
62: public void setContentSubType(String contentSubType)
63: throws ParseException;
64:
65: /**
66: * Gets media sub-type of Header with Content sub-type.
67: *
68: * @return media sub-type of Header with Content sub-type.
69: */
70: public String getContentSubType();
71:
72: }
|