DataSourcepublic class ByteArrayDataSource extends Object implements DataSource
| Constructor | Description |
|---|---|
ByteArrayDataSource(byte[] bytes,
String contentType,
String name) |
| Modifier and Type | Method | Description |
|---|---|---|
byte[] |
getBytes() |
|
String |
getContentType() |
|
InputStream |
getInputStream() |
|
String |
getName() |
|
OutputStream |
getOutputStream() |
|
void |
setBytes(byte[] bytes) |
|
void |
setContentType(String contentType) |
|
void |
setName(String name) |
public void setBytes(byte[] bytes)
public byte[] getBytes()
public void setContentType(String contentType)
public String getContentType()
getContentType in interface DataSourcepublic InputStream getInputStream()
getInputStream in interface DataSourcepublic void setName(String name)
public String getName()
getName in interface DataSourcepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface DataSourceIOExceptionCopyright © 2018. All rights reserved.