ElegantJCharts Java API Specification v2.0

com.elegantj.net.message
Class POP3Message

java.lang.Object
  |
  +--com.elegantj.net.message.POP3Message

public class POP3Message
extends java.lang.Object

POP3Message provides message for the .eml file It provides all the functionality to parse the .eml file Also retrieves all the parameter of the .eml file gives the option to save the attachments separately


Constructor Summary
POP3Message()
          Constructs the POP3Message
 
Method Summary
 int getAttachmentCount()
          Returns the no of the attachment count
 java.lang.String getAttachmentFileName(int index)
          Returns the name of the attchment at the specified index
 java.util.Vector getAttachmentFileNames()
          Returns the attachments names vector
 POP3MessagePart getAttachmentPart(int index)
          Method which Returns the attachment EML part for the specified attachment index
 java.util.Vector getAttachmentParts()
          Method which returns the Vector containing the POP3MessagePart for the each attachments
 int getAttachmentSize(int index)
          Returns the size of the attachment in bytes
 java.lang.String getBody()
          Method which Returns the value of the body
 java.lang.String getBodyFormat()
          Method which returns the body format
 POP3MessagePart getBodyPart()
          Method which returns the body EML part for the body
 java.lang.String getBoundary()
          Method which Returns the value of Boundary
 java.lang.String getCC()
          Method which Returns the value of CC
 int getCCCount()
          Returns the count of the CC addresses
 java.lang.String getCCName(int index)
          Returns the CC name at the specified index
 java.util.Vector getCCNames()
          Returns the vector containing the CC names
 java.lang.String getContentTransferEncoding()
          Method which Returns the value of ContentTransferEncoding
 java.lang.String getContentType()
          Method which Returns the value of ContentType
 java.lang.String getDate()
          Method which Returns the value of Date
 java.lang.String getFrom()
          Method which Returns the value of From
 java.lang.String getMessageID()
          Method which Returns the value of MessageID
 java.lang.String getMimeVersion()
          Method which Returns the value of MimeVersion
 java.lang.String getOrganization()
          Method which Returns the value of organization
 java.lang.String getStatus()
          Method which Returns the value of Status
 java.lang.String getSubject()
          Method which Returns the value of Subject
 java.lang.String getTO()
          Method which Returns the value of TO
 int getTOCount()
          Returns the count of the TO addresses
 java.lang.String getTOName(int index)
          Returns the TO name at the specified index
 java.util.Vector getTONames()
          Returns the vector containing the TO names
 java.lang.String getXMailer()
          Method which Returns the value of XMailer
 java.lang.String getXRcptTo()
          Method which Returns the value of XRcptTo
 java.lang.String getXUIDL()
          Method which Returns the value of XUIDL
 boolean isContainsAttachments()
          Returns the is this EML contains the attachments or not
 void parse(java.io.InputStream inputStream)
          Method which parses the specified specified inputStream
 void parse(java.lang.String filePath)
          Method which parses the specified .eml file
 void saveAttachment(int index, java.lang.String directoryPath)
          Method which saves the attachment at the specified index to the specified directory
 void saveAttachmentAs(int index, java.lang.String filePath)
          Method which saves the attachment at the specified index to the specified filePath
 void saveAttachments(java.lang.String directoryPath)
          Method which saves the all the attachments to the specified directory
 void saveMessage(java.lang.String filePath)
          Method which saves the message to the specified file
 void writeAttachment(int index, java.io.OutputStream os)
          Method which writes the attachment at the specified index to the specified outputStream
 void writeMessage(java.io.OutputStream outputStream)
          Method which writes the message to the specified outputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POP3Message

public POP3Message()
Constructs the POP3Message

Method Detail

parse

public void parse(java.lang.String filePath)
           throws java.lang.Exception
Method which parses the specified .eml file

Parameters:
filePath - the specified .eml file You must call this parse method, before retrieving the .eml file's parameters
java.lang.Exception

parse

public void parse(java.io.InputStream inputStream)
           throws java.lang.Exception
Method which parses the specified specified inputStream

Parameters:
inputStream - The specified inputStream You must call this parse method, before retrieving the .eml file's parameters
java.lang.Exception

getOrganization

public java.lang.String getOrganization()
Method which Returns the value of organization

Returns:
The value of organization

getTO

public java.lang.String getTO()
Method which Returns the value of TO

Returns:
The value of TO

getTONames

public java.util.Vector getTONames()
Returns the vector containing the TO names

Returns:
The vector containing the TO names

getTOCount

public int getTOCount()
Returns the count of the TO addresses

Returns:
int The count the TO addresses

getTOName

public java.lang.String getTOName(int index)
Returns the TO name at the specified index

Parameters:
index - The specified index
Returns:
The TO name at the specified index

getFrom

public java.lang.String getFrom()
Method which Returns the value of From

Returns:
The value of From

getSubject

public java.lang.String getSubject()
Method which Returns the value of Subject

Returns:
The value of Subject

getCC

public java.lang.String getCC()
Method which Returns the value of CC

Returns:
The value of CC

getCCCount

public int getCCCount()
Returns the count of the CC addresses

Returns:
int The count the CC addresses

getCCNames

public java.util.Vector getCCNames()
Returns the vector containing the CC names

Returns:
The vector containing the CC names

getCCName

public java.lang.String getCCName(int index)
Returns the CC name at the specified index

Parameters:
index - The specified index
Returns:
The CC name at the specified index

getContentTransferEncoding

public java.lang.String getContentTransferEncoding()
Method which Returns the value of ContentTransferEncoding

Returns:
The value of ContentTransferEncoding

getXMailer

public java.lang.String getXMailer()
Method which Returns the value of XMailer

Returns:
The value of XMailer

getContentType

public java.lang.String getContentType()
Method which Returns the value of ContentType

Returns:
The value of ContentType

getMimeVersion

public java.lang.String getMimeVersion()
Method which Returns the value of MimeVersion

Returns:
The value of MimeVersion

getMessageID

public java.lang.String getMessageID()
Method which Returns the value of MessageID

Returns:
The value of MessageID

getDate

public java.lang.String getDate()
Method which Returns the value of Date

Returns:
The value of Date

getXRcptTo

public java.lang.String getXRcptTo()
Method which Returns the value of XRcptTo

Returns:
The value of XRcptTo

getStatus

public java.lang.String getStatus()
Method which Returns the value of Status

Returns:
The value of Status

getXUIDL

public java.lang.String getXUIDL()
Method which Returns the value of XUIDL

Returns:
The value of XUIDL

getBoundary

public java.lang.String getBoundary()
Method which Returns the value of Boundary

Returns:
The value of Boundary

getBody

public java.lang.String getBody()
Method which Returns the value of the body

Returns:
The value of body

getBodyFormat

public java.lang.String getBodyFormat()
Method which returns the body format

Returns:
The body format The possible values are text/plain, text/html, multipart/mixed

getBodyPart

public POP3MessagePart getBodyPart()
Method which returns the body EML part for the body

Returns:
The body EML part for the body

getAttachmentParts

public java.util.Vector getAttachmentParts()
Method which returns the Vector containing the POP3MessagePart for the each attachments

Returns:
The Vector containing the POP3MessagePart for the each attachments

getAttachmentPart

public POP3MessagePart getAttachmentPart(int index)
Method which Returns the attachment EML part for the specified attachment index

Parameters:
index - The specified attachment index
Returns:
The attachment EML part for the specified attachment index

isContainsAttachments

public boolean isContainsAttachments()
Returns the is this EML contains the attachments or not

Returns:
The value of is this EML contains the attachments or not

getAttachmentFileNames

public java.util.Vector getAttachmentFileNames()
Returns the attachments names vector

Returns:
The attachments names vector If The EML not contains the attachements then null is returned

getAttachmentCount

public int getAttachmentCount()
Returns the no of the attachment count

Returns:
The no of the attachment count

getAttachmentFileName

public java.lang.String getAttachmentFileName(int index)
Returns the name of the attchment at the specified index

Returns:
The name of the attachment at the specified index

getAttachmentSize

public int getAttachmentSize(int index)
Returns the size of the attachment in bytes

Returns:
The size of the attachment

saveAttachments

public void saveAttachments(java.lang.String directoryPath)
Method which saves the all the attachments to the specified directory

Parameters:
directoryPath - The specified directory to save all the attachment

saveAttachment

public void saveAttachment(int index,
                           java.lang.String directoryPath)
Method which saves the attachment at the specified index to the specified directory

Parameters:
index - The specified attachment index
directoryPath - The specified directory path

saveAttachmentAs

public void saveAttachmentAs(int index,
                             java.lang.String filePath)
Method which saves the attachment at the specified index to the specified filePath

Parameters:
index - The specified attachment index
filePath - The file path including the directory and file name

writeAttachment

public void writeAttachment(int index,
                            java.io.OutputStream os)
                     throws java.lang.Exception
Method which writes the attachment at the specified index to the specified outputStream

Parameters:
index - The specified index attachment index
os - The specified output stream
java.lang.Exception

saveMessage

public void saveMessage(java.lang.String filePath)
                 throws java.lang.Exception
Method which saves the message to the specified file

Parameters:
filePath - The specified filePath
java.lang.Exception

writeMessage

public void writeMessage(java.io.OutputStream outputStream)
                  throws java.lang.Exception
Method which writes the message to the specified outputStream

java.lang.Exception

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.