abstract class PartContent
extends java.lang.Object
| Constructor and Description |
|---|
PartContent() |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract void |
destroy()
Release all resources used to store the content of the MIME part.
|
(package private) abstract javax.activation.DataSource |
getDataSource(java.lang.String contentType)
Get a
DataSource implementation specific for this buffering strategy, if supported. |
(package private) abstract java.io.InputStream |
getInputStream()
Get an
InputStream representing the buffered MIME part content. |
(package private) abstract long |
getSize()
Get the size of the MIME part, more precisely the number of bytes in the decoded content of
the MIME part.
|
(package private) abstract void |
writeTo(java.io.OutputStream out)
Write the buffered MIME part content to the given output stream.
|
abstract java.io.InputStream getInputStream()
throws java.io.IOException
InputStream representing the buffered MIME part content. Note that a new
InputStream object must be returned each time this method is called, and the stream
must be positioned at the beginning of the data.java.io.IOException - if an error occurs while accessing the buffered contentabstract javax.activation.DataSource getDataSource(java.lang.String contentType)
DataSource implementation specific for this buffering strategy, if supported.
If no DataSource is returned, then a default implementation will be used. If a
DataSource is returned, it should implement SizeAwareDataSource.contentType - the content type for the DataSource, which must be returned by
DataSource.getContentType()DataSource implementation or null if a default
DataSource implementation should be usedabstract void writeTo(java.io.OutputStream out)
throws java.io.IOException
out - the output stream to write the content tojava.io.IOException - if an I/O error occurs (either while reading the buffered content or while
writing to the output stream)abstract long getSize()
abstract void destroy()
throws java.io.IOException
java.io.IOException - if an I/O error occurs