Package org.apache.axiom.attachments
Interface Part
- All Known Implementing Classes:
PartOnFile,PartOnMemory,PartOnMemoryEnhanced
public interface Part
Abstract for Part. A Part can be the SOAP Part or an Attachment Part.
There are several implementations for part, which are optimized for
space and time.
A Part is created with the PartFactory.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a Header (name, value) to the partDeprecated.The callers should not no how the part is implemented.Get the value of a specific headerlonggetSize()
-
Method Details
-
getDataHandler
- Returns:
- DataHandler representing this part
- Throws:
javax.mail.MessagingException
-
getSize
long getSize() throws javax.mail.MessagingException- Returns:
- size
- Throws:
javax.mail.MessagingException
-
getContentType
- Returns:
- content type of the part
- Throws:
javax.mail.MessagingException
-
getContentID
- Returns:
- content id of the part
- Throws:
javax.mail.MessagingException
-
getFileName
Deprecated.The callers should not no how the part is implemented.The part may be backed by a file. If that is the case, this method returns the file name.- Returns:
- the name of the file
- Throws:
javax.mail.MessagingException
-
getInputStream
- Returns:
- Get the part data as an input stream
- Throws:
IOExceptionjavax.mail.MessagingException
-
addHeader
Add a Header (name, value) to the part- Parameters:
name-value-- Throws:
javax.mail.MessagingException
-
getHeader
Get the value of a specific header- Parameters:
name-- Returns:
- value or null
- Throws:
javax.mail.MessagingException
-
getAllHeaders
- Returns:
- Enumeration of javax.mail.Header
- Throws:
javax.mail.MessagingException
-