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 dataIOException
public String getContentType()
getContentType
in interface DataSource
public InputStream getInputStream() throws IOException
getInputStream
in interface DataSource
IOException
public String getName()
getName
in interface DataSource
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataSource
IOException
Copyright © 2002-2015 Atlassian. All Rights Reserved.