Package com.helger.mail.datasource
Class InputStreamProviderDataSource
- java.lang.Object
-
- com.helger.mail.datasource.InputStreamProviderDataSource
-
- All Implemented Interfaces:
IExtendedDataSource,jakarta.activation.DataSource
public class InputStreamProviderDataSource extends Object implements IExtendedDataSource
A specialDataSourceimplementation based on data fromIHasInputStream.- Author:
- Philip Helger
-
-
Field Summary
-
Fields inherited from interface com.helger.mail.datasource.IExtendedDataSource
DEFAULT_CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description InputStreamProviderDataSource(com.helger.commons.io.IHasInputStream aISP, String sName)InputStreamProviderDataSource(com.helger.commons.io.IHasInputStream aISP, String sName, com.helger.commons.mime.IMimeType aContentType)InputStreamProviderDataSource(com.helger.commons.io.IHasInputStream aISP, String sName, String sContentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()InputStreamgetInputStream()StringgetName()OutputStreamgetOutputStream()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.mail.datasource.IExtendedDataSource
getAsDataHandler, getEncodingAware
-
-
-
-
Constructor Detail
-
InputStreamProviderDataSource
public InputStreamProviderDataSource(@Nonnull com.helger.commons.io.IHasInputStream aISP, @Nonnull String sName)
-
InputStreamProviderDataSource
public InputStreamProviderDataSource(@Nonnull com.helger.commons.io.IHasInputStream aISP, @Nonnull String sName, @Nullable com.helger.commons.mime.IMimeType aContentType)
-
-
Method Detail
-
getInputStream
@Nullable public InputStream getInputStream()
- Specified by:
getInputStreamin interfacejakarta.activation.DataSource
-
getOutputStream
@UnsupportedOperation public OutputStream getOutputStream()
- Specified by:
getOutputStreamin interfacejakarta.activation.DataSource
-
getContentType
@Nonnull public String getContentType()
- Specified by:
getContentTypein interfacejakarta.activation.DataSource
-
getName
@Nonnull public String getName()
- Specified by:
getNamein interfacejakarta.activation.DataSource
-
-