|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.messaging.saaj.packaging.mime.internet.MimePartDataSource
public final class MimePartDataSource
A utility class that implements a DataSource out of a MimeBodyPart. This class is primarily meant for service providers.
| Constructor Summary | |
|---|---|
MimePartDataSource(MimeBodyPart part)
Constructor, that constructs a DataSource from a MimeBodyPart. |
|
| Method Summary | |
|---|---|
String |
getContentType()
Returns the content-type of this DataSource. |
InputStream |
getInputStream()
Returns an input stream from this MimeBodyPart. |
String |
getName()
DataSource method to return a name. |
OutputStream |
getOutputStream()
DataSource method to return an output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MimePartDataSource(MimeBodyPart part)
| Method Detail |
|---|
public InputStream getInputStream()
throws IOException
This method applies the appropriate transfer-decoding, based on the Content-Transfer-Encoding attribute of this MimeBodyPart. Thus the returned input stream is a decoded stream of bytes.
This implementation obtains the raw content from the MimeBodyPart
using the getContentStream() method and decodes
it using the MimeUtility.decode() method.
getInputStream in interface DataSourceIOException
public OutputStream getOutputStream()
throws IOException
This implementation throws the UnknownServiceException.
getOutputStream in interface DataSourceIOExceptionpublic String getContentType()
This implementation just invokes the getContentType
method on the MimeBodyPart.
getContentType in interface DataSourcepublic String getName()
This implementation just returns an empty string.
getName in interface DataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||