Class DataSourceProvider.ByteArrayDataSource
- java.lang.Object
-
- org.glassfish.jersey.message.internal.DataSourceProvider.ByteArrayDataSource
-
- All Implemented Interfaces:
jakarta.activation.DataSource
- Enclosing class:
- DataSourceProvider
public static class DataSourceProvider.ByteArrayDataSource extends Object implements jakarta.activation.DataSource
Modified from javax.mail.util.ByteArrayDataSource A DataSource backed by a byte array. The byte array may be passed in directly, or may be initialized from an InputStream or a String.- Since:
- JavaMail 1.4
- Author:
- John Mani, Bill Shannon, Max Spivak
-
-
Constructor Summary
Constructors Constructor Description ByteArrayDataSource(InputStream is, String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentType()
InputStream
getInputStream()
String
getName()
OutputStream
getOutputStream()
void
setName(String name)
-
-
-
Constructor Detail
-
ByteArrayDataSource
public ByteArrayDataSource(InputStream is, String type) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfacejakarta.activation.DataSource
- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStream
in interfacejakarta.activation.DataSource
- Throws:
IOException
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfacejakarta.activation.DataSource
-
getName
public String getName()
- Specified by:
getName
in interfacejakarta.activation.DataSource
-
setName
public void setName(String name)
-
-