public static class MultiPartMIMEWriter.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Create a MultiPartMIMEWriter without a preamble or epilogue.
|
Builder(java.lang.String preamble,
java.lang.String epilogue)
Create a MultiPartMIMEWriter Builder using the specified preamble and epilogue.
|
public Builder(java.lang.String preamble,
java.lang.String epilogue)
preamble - non-null String to be placed before the multipart mime envelope according to the RFC.epilogue - non-null String to be placed after the multipart mime enveloped according to the RFC.public Builder()
public MultiPartMIMEWriter.Builder appendDataSource(MultiPartMIMEDataSourceWriter dataSource)
MultiPartMIMEDataSourceWriter to be placed in the multipart mime envelope.dataSource - the data source to be added.public MultiPartMIMEWriter.Builder appendDataSourceIterator(MultiPartMIMEDataSourceIterator multiPartMIMEDataSourceIterator)
MultiPartMIMEDataSourceIterator to be used as a non-nested data source
within the multipart mime envelope.
All the individual parts read using the MultiPartMIMEDataSourceIterator will be placed one by one into
this new envelope with boundaries replaced.multiPartMIMEDataSourceIterator - the MultiPartMIMEDataSourceIterator that will be used
to produce multiple parts.public MultiPartMIMEWriter.Builder appendDataSources(java.util.List<MultiPartMIMEDataSourceWriter> dataSources)
MultiPartMIMEDataSourceWriters into the multipart mime envelope.dataSources - the data sources to be added.public MultiPartMIMEWriter.Builder prependDataSource(MultiPartMIMEDataSourceWriter dataSource)
MultiPartMIMEDataSourceWriter to be placed in the multipart mime envelope. This data source
will be placed at the beginning of the envelope and all existing data sources provided to this builder
thus far will shift forward by 1.dataSource - the data source to be added at the beginning of the envelope.public int getCurrentSize()
MultiPartMIMEDataSourceWriters and
MultiPartMIMEDataSourceIterators that have been added thus far.public MultiPartMIMEWriter build()
MultiPartMIMEWriter.MultiPartMIMEWriter.