public class ByteArrayDataSource extends Object implements DataSource
DataSource that reads input from a stream and captures it into a I18nVal. This
is useful for capturing strea data into emails for example.| Constructor and Description |
|---|
ByteArrayDataSource(InputStream inputStream,
String contentType)
Create a datasource from an input stream.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public ByteArrayDataSource(InputStream inputStream, String contentType) throws IOException
inputStream - This is NOT closed as a result of this operationcontentType - The content type of the dataIOExceptionpublic String getContentType()
getContentType in interface DataSourcepublic InputStream getInputStream() throws IOException
getInputStream in interface DataSourceIOExceptionpublic String getName()
getName in interface DataSourcepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface DataSourceIOExceptionCopyright © 2002-2024 Atlassian. All Rights Reserved.