Class PartOnFile
java.lang.Object
org.apache.axiom.attachments.impl.PartOnFile
- All Implemented Interfaces:
Part
PartOnFile stores that attachment in a file.
This implementation is used for very large attachments to reduce
the in-memory footprint.
The PartOnFile object is created by the PartFactory
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a Header (name, value) to the partThe part may be backed by a file.Get the value of a specific headerlonggetSize()
-
Method Details
-
getDataHandler
- Specified by:
getDataHandlerin interfacePart- Returns:
- DataHandler representing this part
- Throws:
javax.mail.MessagingException
-
getFileName
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
- Specified by:
getInputStreamin interfacePart- Returns:
- Get the part data as an input stream
- Throws:
IOExceptionjavax.mail.MessagingException
-
getSize
public long getSize() -
addHeader
Description copied from interface:PartAdd a Header (name, value) to the part -
getAllHeaders
- Specified by:
getAllHeadersin interfacePart- Returns:
- Enumeration of javax.mail.Header
- Throws:
javax.mail.MessagingException
-
getHeader
Description copied from interface:PartGet the value of a specific header -
getContentID
- Specified by:
getContentIDin interfacePart- Returns:
- content id of the part
- Throws:
javax.mail.MessagingException
-
getContentType
- Specified by:
getContentTypein interfacePart- Returns:
- content type of the part
- Throws:
javax.mail.MessagingException
-
getContentTransferEncoding
- Returns:
- contentTransferEncoding
- Throws:
javax.mail.MessagingException
-