|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.mail.util.ByteArrayDataSource
public class ByteArrayDataSource
This is a DataSource that reads input from a stream and captures it into a ByteArray. This
is useful for capturing strea data into emails for example.
| Constructor Summary | |
|---|---|
ByteArrayDataSource(InputStream inputStream,
String contentType)
Create a datasource from an input stream. |
|
| Method Summary | |
|---|---|
String |
getContentType()
Get the content type. |
InputStream |
getInputStream()
Get the input stream. |
String |
getName()
Get the name. |
OutputStream |
getOutputStream()
Get the OutputStream to write to |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArrayDataSource(InputStream inputStream,
String contentType)
throws IOException
inputStream - This is NOT closed as a result of this operationcontentType - The content type of the data
IOException| Method Detail |
|---|
public String getContentType()
getContentType in interface DataSource
public InputStream getInputStream()
throws IOException
getInputStream in interface DataSourceIOExceptionpublic String getName()
getName in interface DataSource
public OutputStream getOutputStream()
throws IOException
getOutputStream in interface DataSourceIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||