public class ByteArrayDataSource extends Object implements DataSource, Serializable
Constructor and Description |
---|
ByteArrayDataSource(byte[] data,
String type)
Creates a new ByteArrayDataSource object.
|
ByteArrayDataSource(String data,
String type)
Creates a new ByteArrayDataSource object.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
public ByteArrayDataSource(String data, String type)
data
- The datatype
- The parameterspublic ByteArrayDataSource(byte[] data, String type)
data
- The datatype
- The parameterspublic InputStream getInputStream() throws IOException
getInputStream
in interface DataSource
IOException
- The IO exceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataSource
IOException
- The IO exceptionpublic String getContentType()
getContentType
in interface DataSource
public String getName()
getName
in interface DataSource
Copyright © 2020 City of Paris. All rights reserved.