Java Doc for MessageHeader.java in  » 6.0-JDK-Modules » j2me » sun » net » www » 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 » 6.0 JDK Modules » j2me » sun.net.www 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.net.www.MessageHeader

MessageHeader
public class MessageHeader (Code)
An RFC 844 or MIME message header. Includes methods for parsing headers from incoming streams, fetching values, setting values, and printing headers. Key values of null are legal: they indicate lines in the header that don't have a valid key, but do have a value (this isn't legal according to the standard, but lines like this are everywhere).

Inner Class :class HeaderIterator implements Iterator


Constructor Summary
public  MessageHeader()
    
public  MessageHeader(InputStream is)
    

Method Summary
public synchronized  voidadd(String k, String v)
     Adds a key value pair to the end of the header.
public static  StringcanonicalID(String id)
    
public synchronized  StringfindNextValue(String k, String v)
     Deprecated: Use multiValueIterator() instead. Find the next value that corresponds to this key. It finds the first value that follows v.
public synchronized  StringfindValue(String k)
     Find the value that corresponds to this key. It finds only the first occurrence of the key.
Parameters:
  k - the key to find.
public synchronized  MapgetHeaders()
    
public synchronized  MapgetHeaders(String[] excludeList)
    
public synchronized  intgetKey(String k)
    
public synchronized  StringgetKey(int n)
    
public synchronized  StringgetValue(int n)
    
public  voidmergeHeader(InputStream is)
     Parse and merge a MIME header from an input stream.
public  IteratormultiValueIterator(String k)
    
public  voidparseHeader(InputStream is)
     Parse a MIME header from an input stream.
public synchronized  voidprepend(String k, String v)
     Prepends a key value pair to the beginning of the header.
public synchronized  voidprint(PrintStream p)
     Prints the key-value pairs represented by this header.
public synchronized  voidreset()
    
public synchronized  voidset(int i, String k, String v)
     Overwrite the previous key/val pair at location 'i' with the new k/v.
public synchronized  voidset(String k, String v)
     Sets the value of a key.
public synchronized  voidsetIfNotSet(String k, String v)
     Set's the value of a key only if there is no key with that value already.
public synchronized  StringtoString()
    


Constructor Detail
MessageHeader
public MessageHeader()(Code)



MessageHeader
public MessageHeader(InputStream is) throws java.io.IOException(Code)




Method Detail
add
public synchronized void add(String k, String v)(Code)
Adds a key value pair to the end of the header. Duplicates are allowed



canonicalID
public static String canonicalID(String id)(Code)
Convert a message-id string to canonical form (strips off leading and trailing <>s)



findNextValue
public synchronized String findNextValue(String k, String v)(Code)
Deprecated: Use multiValueIterator() instead. Find the next value that corresponds to this key. It finds the first value that follows v. To iterate over all the values of a key use:
 for(String v=h.findValue(k); v!=null; v=h.findNextValue(k, v)) {
 ...
 }
 



findValue
public synchronized String findValue(String k)(Code)
Find the value that corresponds to this key. It finds only the first occurrence of the key.
Parameters:
  k - the key to find. null if not found.



getHeaders
public synchronized Map getHeaders()(Code)



getHeaders
public synchronized Map getHeaders(String[] excludeList)(Code)



getKey
public synchronized int getKey(String k)(Code)



getKey
public synchronized String getKey(int n)(Code)



getValue
public synchronized String getValue(int n)(Code)



mergeHeader
public void mergeHeader(InputStream is) throws java.io.IOException(Code)
Parse and merge a MIME header from an input stream.



multiValueIterator
public Iterator multiValueIterator(String k)(Code)
return an Iterator that returns all values of a particular key in sequence



parseHeader
public void parseHeader(InputStream is) throws java.io.IOException(Code)
Parse a MIME header from an input stream.



prepend
public synchronized void prepend(String k, String v)(Code)
Prepends a key value pair to the beginning of the header. Duplicates are allowed



print
public synchronized void print(PrintStream p)(Code)
Prints the key-value pairs represented by this header. Also prints the RFC required blank line at the end. Omits pairs with a null key.



reset
public synchronized void reset()(Code)
Reset a message header (all key/values removed)



set
public synchronized void set(int i, String k, String v)(Code)
Overwrite the previous key/val pair at location 'i' with the new k/v. If the index didn't exist before the key/val is simply tacked onto the end.



set
public synchronized void set(String k, String v)(Code)
Sets the value of a key. If the key already exists in the header, it's value will be changed. Otherwise a new key/value pair will be added to the end of the header.



setIfNotSet
public synchronized void setIfNotSet(String k, String v)(Code)
Set's the value of a key only if there is no key with that value already.



toString
public synchronized String toString()(Code)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.