|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.mail.datasource.FilePartDataSource
The FilePartDataSource class provides an object, that wraps a
Cocoon Part
object in a DataSource interface.
DataSource
Constructor Summary | |
FilePartDataSource(Part part)
Creates a new instance of FilePartDataSource from an Part object. |
|
FilePartDataSource(Part part,
String type,
String name)
Creates a new instance of FilePartDataSource from an Part object. |
Method Summary | |
String |
getContentType()
Return the content type (mime type) obtained from Part.getMimeType() .
|
InputStream |
getInputStream()
The InputStream object obtained from Part.getInputStream()
object. |
String |
getName()
Returns the name for this DataSource object. |
OutputStream |
getOutputStream()
Unimplemented. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilePartDataSource(Part part)
Part
object.
part
- An Part
object.public FilePartDataSource(Part part, String type, String name)
Part
object.
part
- An Part
object.Method Detail |
public String getContentType()
Part.getMimeType()
.
Return application/octet-stream
if getMimeType()
returns null
.
getContentType
in interface DataSource
DataSource
object.public InputStream getInputStream() throws IOException
Part.getInputStream()
object.
getInputStream
in interface DataSource
DataSource
object.
IOException
- if an I/O error occurs.public String getName()
DataSource
object. This is
what is returned by
Part.getFileName()
.
getName
in interface DataSource
DataSource
object.public OutputStream getOutputStream() throws IOException
IOException
.
getOutputStream
in interface DataSource
IOException
- since unimplemented
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |