Class PartOnMemoryEnhanced
- java.lang.Object
-
- org.apache.axiom.attachments.impl.PartOnMemoryEnhanced
-
- All Implemented Interfaces:
Part
public class PartOnMemoryEnhanced extends Object
PartOnMemoryEnhanced stores the attachment in memory (in non-contigous byte arrays) This implementation is used for smaller attachments to enhance performance. The PartOnMemoryEnhanced object is created by the PartFactory- See Also:
PartFactory
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String name, String value)Add a Header (name, value) to the partEnumerationgetAllHeaders()StringgetContentID()StringgetContentTransferEncoding()StringgetContentType()DataHandlergetDataHandler()StringgetFileName()The part may be backed by a file.StringgetHeader(String name)Get the value of a specific headerInputStreamgetInputStream()longgetSize()
-
-
-
Method Detail
-
getDataHandler
public DataHandler getDataHandler() throws javax.mail.MessagingException
- Specified by:
getDataHandlerin interfacePart- Returns:
- DataHandler representing this part
- Throws:
javax.mail.MessagingException
-
getFileName
public String getFileName() throws javax.mail.MessagingException
Description copied from interface:PartThe part may be backed by a file. If that is the case, this method returns the file name.- Specified by:
getFileNamein interfacePart- Returns:
- the name of the file
- Throws:
javax.mail.MessagingException
-
getInputStream
public InputStream getInputStream() throws IOException, javax.mail.MessagingException
- Specified by:
getInputStreamin interfacePart- Returns:
- Get the part data as an input stream
- Throws:
IOExceptionjavax.mail.MessagingException
-
getSize
public long getSize() throws javax.mail.MessagingException
-
addHeader
public void addHeader(String name, String value)
Description copied from interface:PartAdd a Header (name, value) to the part
-
getAllHeaders
public Enumeration getAllHeaders() throws javax.mail.MessagingException
- Specified by:
getAllHeadersin interfacePart- Returns:
- Enumeration of javax.mail.Header
- Throws:
javax.mail.MessagingException
-
getHeader
public String getHeader(String name)
Description copied from interface:PartGet the value of a specific header
-
getContentID
public String getContentID() throws javax.mail.MessagingException
- Specified by:
getContentIDin interfacePart- Returns:
- content id of the part
- Throws:
javax.mail.MessagingException
-
getContentType
public String getContentType() throws javax.mail.MessagingException
- Specified by:
getContentTypein interfacePart- Returns:
- content type of the part
- Throws:
javax.mail.MessagingException
-
getContentTransferEncoding
public String getContentTransferEncoding() throws javax.mail.MessagingException
- Returns:
- contentTransferEncoding
- Throws:
javax.mail.MessagingException
-
-