Source Code Cross Referenced for ContentType.java in  » Web-Server » simple » simple » util » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Server » simple » simple.util.net 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ContentType.java February 2001
003:         *
004:         * Copyright (C) 2001, Niall Gallagher <niallg@users.sf.net>
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation.
009:         *
010:         * This library is distributed in the hope that it will be useful,
011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
013:         * GNU Lesser General Public License for more details.
014:         *
015:         * You should have received a copy of the GNU Lesser General 
016:         * Public License along with this library; if not, write to the 
017:         * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
018:         * Boston, MA  02111-1307  USA
019:         */
020:
021:        package simple.util.net;
022:
023:        /** 
024:         * This provides access to the MIME type parts, that is the type 
025:         * subtype and an optional <code>charset</code> parameter. The 
026:         * <code>charset</code> parameter is one of many parameters that 
027:         * can be assiciated with a MIME type. This however only provides 
028:         * access to the <code>charset</code> value.
029:         * <p>
030:         * The <code>getCharset</code> will return <code>val</code> if the 
031:         * MIME type represented is type/subtype; charset=val. The type and 
032:         * subtype are set to the <code>String</code> value <code>null</code> 
033:         * if the <code>setPrimary</code> or <code>setSecondary</code> are 
034:         * given a <code>null</code> <code>String</code>.
035:         *
036:         * @author Niall Gallagher
037:         */
038:        public interface ContentType {
039:
040:            /** 
041:             * This sets the type to whatever value is in the <code>String</code> 
042:             * object. If the <code>String</code> object is <code>null</code> the 
043:             * this object's <code>toString</code> method will contain the value 
044:             * <code>null</code>.
045:             * <p>
046:             * If type is <code>null</code> then the <code>toString</code> method 
047:             * will be null/subtype;param=value. If the type is non-null this will 
048:             * contain the value of the <code>String</code>.
049:             * 
050:             * @param type the type to add to the MIME type
051:             */
052:            public void setPrimary(String type);
053:
054:            /** 
055:             * This is used to retrive the type of this MIME type. The type 
056:             * part within the MIME type defines the generic type. For example 
057:             * <code>type/subtype;param1=value1</code>. This will return the 
058:             * value of the type part. If there is no type part then this will 
059:             * return <code>null</code> otherwise the type <code>String</code>.
060:             *
061:             * @return the type part of the MIME type
062:             */
063:            public String getPrimary();
064:
065:            /** 
066:             * Sets the subtype to whatever value is in the <code>String</code> 
067:             * object. If the <code>String</code> object is <code>null</code> 
068:             * the this object's <code>toString</code> method will contain the 
069:             * value <code>null</code>.
070:             * <p>
071:             * If subtype is <code>null</code> then the <code>toString</code> 
072:             * method will be <code>type/null;param=value</code>. If the type 
073:             * is non-null this will contain the value of the <code>String</code>.
074:             *
075:             * @param type the type to add to the MIME type
076:             */
077:            public void setSecondary(String type);
078:
079:            /** 
080:             * This is used to retrive the subtype of this MIME type. The 
081:             * subtype part within the MIME type defines the specific type. 
082:             * For example <code>type/subtype;param1=value1</code>. This will 
083:             * return the value of the subtype part. If there is no subtype 
084:             * part then this will return <code>null</code> otherwise the type 
085:             * <code>String</code>.
086:             *
087:             * @return the subtype part of the MIME type
088:             */
089:            public String getSecondary();
090:
091:            /** 
092:             * This will set the <code>charset</code> to whatever value is 
093:             * in the <code>String</code> object. If the <code>String</code> 
094:             * object is <code>null</code> then this <code>toString</code> 
095:             * method will not contain the <code>charset</code>.
096:             * <p>
097:             * If <code>charset</code> is <code>null</code> then the 
098:             * <code>toString</code> method will be type/subtype. If the 
099:             * <code>charset</code> value is non-null this will contain 
100:             * the <code>charset</code> parameter with that value.
101:             *
102:             * @param charset the value to add to the MIME type
103:             */
104:            public void setCharset(String charset);
105:
106:            /** 
107:             * This is used to retrive the <code>charset</code> of this MIME 
108:             * type. The <code>charset</code> part within the MIME type is an 
109:             * optional parameter. For example <code>type/subtype;charset=value
110:             * </code>. This will return the value of the <code>charset</code> 
111:             * value. If there is no <code>charset</code> param then this will 
112:             * return <code>null</code> otherwise the type <code>String</code>.  
113:             *
114:             * @return the <code>charset</code> value for the MIME type
115:             */
116:            public String getCharset();
117:
118:            /** 
119:             * This will return the <code>String</code> value of the MIME 
120:             * type. This will return the MIME type with the type, subtype 
121:             * and if there is a <code>charset</code> value specified then 
122:             * a <code>charset</code> parameter.
123:             * <p>
124:             * The <code>charset</code> parameter is an optional parameter 
125:             * to the MIME type. An example a MIME type is <code>type/subtype; 
126:             * charset=value<code>. If the type or subtype is <code>null</code>
127:             * then the MIME type will be wither null/subtype, type/null or if 
128:             * both are <code>null</code> null/null.
129:             *
130:             * @return the <code>String</code> representation of the MIME type
131:             */
132:            public String toString();
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.