Java Doc for MimeMessageWrapper.java in  » Web-Mail » james-2.3.1 » org » apache » james » core » 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 Mail » james 2.3.1 » org.apache.james.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.james.core.MimeMessageWrapper

MimeMessageWrapper
public class MimeMessageWrapper extends MimeMessage implements Disposable(Code)
This object wraps a MimeMessage, only loading the underlying MimeMessage object when needed. Also tracks if changes were made to reduce unnecessary saves.


Field Summary
protected  booleanbodyModified
    
protected  booleanheadersModified
    
protected  booleanmessageParsed
    
protected  MimeMessageSourcesource
    

Constructor Summary
public  MimeMessageWrapper(Session session, MimeMessageSource source)
    
public  MimeMessageWrapper(MimeMessageSource source)
    
public  MimeMessageWrapper(MimeMessage original)
    

Method Summary
public  voidaddHeader(String name, String value)
    
public  voidaddHeaderLine(String line)
    
protected synchronized  InternetHeaderscreateInternetHeaders(InputStream is)
     If we already parsed the headers then we simply return the updated ones.
public  voiddispose()
    
public  EnumerationgetAllHeaderLines()
    
public  EnumerationgetAllHeaders()
    
protected  InputStreamgetContentStream()
    
public  String[]getHeader(String name)
    
public  StringgetHeader(String name, String delimiter)
    
public  intgetLineCount()
     Corrects JavaMail 1.1 version which always returns -1.
public  EnumerationgetMatchingHeaderLines(String[] names)
    
public  EnumerationgetMatchingHeaders(String[] names)
    
public  longgetMessageSize()
    
public  EnumerationgetNonMatchingHeaderLines(String[] names)
    
public  EnumerationgetNonMatchingHeaders(String[] names)
    
public  InputStreamgetRawInputStream()
    
public  intgetSize()
     This is the MimeMessage implementation - this should return ONLY the body, not the entire message (should not count headers).
public synchronized  StringgetSourceId()
     Returns the source ID of the MimeMessageSource that is supplying this with data.
public synchronized  booleanisModified()
     Get whether the message has been modified.
protected synchronized  voidloadHeaders()
     Load the message headers from the internal source.
protected synchronized  voidloadMessage()
     Load the complete MimeMessage from the internal source.
protected synchronized  voidparse(InputStream is)
    
public  voidremoveHeader(String name)
    
public synchronized  voidsetDataHandler(DataHandler arg0)
     The message is changed when working with headers and when altering the content.
public  voidsetHeader(String name, String value)
    
public synchronized  voidwriteTo(OutputStream os)
    
public  voidwriteTo(OutputStream os, String[] ignoreList)
    
public  voidwriteTo(OutputStream headerOs, OutputStream bodyOs)
    
public synchronized  voidwriteTo(OutputStream headerOs, OutputStream bodyOs, String[] ignoreList)
    

Field Detail
bodyModified
protected boolean bodyModified(Code)
This is false until we parse the message



headersModified
protected boolean headersModified(Code)
This is false until we parse the message



messageParsed
protected boolean messageParsed(Code)
This is false until we parse the message



source
protected MimeMessageSource source(Code)
Can provide an input stream to the data




Constructor Detail
MimeMessageWrapper
public MimeMessageWrapper(Session session, MimeMessageSource source) throws MessagingException(Code)
A constructor that instantiates a MimeMessageWrapper based on a MimeMessageSource
Parameters:
  source - the MimeMessageSource
throws:
  MessagingException -



MimeMessageWrapper
public MimeMessageWrapper(MimeMessageSource source) throws MessagingException(Code)
A constructor that instantiates a MimeMessageWrapper based on a MimeMessageSource
Parameters:
  source - the MimeMessageSource
throws:
  MessagingException -
throws:
  MessagingException -



MimeMessageWrapper
public MimeMessageWrapper(MimeMessage original) throws MessagingException(Code)




Method Detail
addHeader
public void addHeader(String name, String value) throws MessagingException(Code)



addHeaderLine
public void addHeaderLine(String line) throws MessagingException(Code)



createInternetHeaders
protected synchronized InternetHeaders createInternetHeaders(InputStream is) throws MessagingException(Code)
If we already parsed the headers then we simply return the updated ones. Otherwise we parse
See Also:   javax.mail.internet.MimeMessage.createInternetHeaders(java.io.InputStream)



dispose
public void dispose()(Code)

See Also:   org.apache.avalon.framework.activity.Disposable.dispose



getAllHeaderLines
public Enumeration getAllHeaderLines() throws MessagingException(Code)



getAllHeaders
public Enumeration getAllHeaders() throws MessagingException(Code)



getContentStream
protected InputStream getContentStream() throws MessagingException(Code)

See Also:   javax.mail.internet.MimeMessage.getContentStream



getHeader
public String[] getHeader(String name) throws MessagingException(Code)
We override all the "headers" access methods to be sure that we loaded the headers



getHeader
public String getHeader(String name, String delimiter) throws MessagingException(Code)



getLineCount
public int getLineCount() throws MessagingException(Code)
Corrects JavaMail 1.1 version which always returns -1. Only corrected for content less than 5000 bytes, to avoid memory hogging.



getMatchingHeaderLines
public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException(Code)



getMatchingHeaders
public Enumeration getMatchingHeaders(String[] names) throws MessagingException(Code)



getMessageSize
public long getMessageSize() throws MessagingException(Code)
Returns size of message, ie headers and content



getNonMatchingHeaderLines
public Enumeration getNonMatchingHeaderLines(String[] names) throws MessagingException(Code)



getNonMatchingHeaders
public Enumeration getNonMatchingHeaders(String[] names) throws MessagingException(Code)



getRawInputStream
public InputStream getRawInputStream() throws MessagingException(Code)

See Also:   javax.mail.internet.MimeMessage.getRawInputStream



getSize
public int getSize() throws MessagingException(Code)
This is the MimeMessage implementation - this should return ONLY the body, not the entire message (should not count headers). Will have to parse the message.



getSourceId
public synchronized String getSourceId()(Code)
Returns the source ID of the MimeMessageSource that is supplying this with data.
See Also:   MimeMessageSource



isModified
public synchronized boolean isModified()(Code)
Get whether the message has been modified. whether the message has been modified



loadHeaders
protected synchronized void loadHeaders() throws MessagingException(Code)
Load the message headers from the internal source.
throws:
  MessagingException - if an error is encountered whileloading the headers



loadMessage
protected synchronized void loadMessage() throws MessagingException(Code)
Load the complete MimeMessage from the internal source.
throws:
  MessagingException - if an error is encountered whileloading the message



parse
protected synchronized void parse(InputStream is) throws MessagingException(Code)

See Also:   javax.mail.internet.MimeMessage.parse(java.io.InputStream)



removeHeader
public void removeHeader(String name) throws MessagingException(Code)



setDataHandler
public synchronized void setDataHandler(DataHandler arg0) throws MessagingException(Code)
The message is changed when working with headers and when altering the content. Every method that alter the content will fallback to this one.
See Also:   javax.mail.Part.setDataHandler(javax.activation.DataHandler)



setHeader
public void setHeader(String name, String value) throws MessagingException(Code)



writeTo
public synchronized void writeTo(OutputStream os) throws IOException, MessagingException(Code)
Rewritten for optimization purposes



writeTo
public void writeTo(OutputStream os, String[] ignoreList) throws IOException, MessagingException(Code)
Rewritten for optimization purposes



writeTo
public void writeTo(OutputStream headerOs, OutputStream bodyOs) throws IOException, MessagingException(Code)
Write



writeTo
public synchronized void writeTo(OutputStream headerOs, OutputStream bodyOs, String[] ignoreList) throws IOException, MessagingException(Code)



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