/** * Creates an Attachment with some of the MIME headers specified. * * @param dataSource the data source * @param contentType the Content-Type header, can be <code>null</code> * @param disposition the Content-Disposition header, can be <code>null</code> */ public Attachment(DataSource dataSource, String contentType, ContentDisposition disposition) { this.dataSource = dataSource; this.contentType = contentType; this.contentDisposition = disposition == null ? null : disposition.toString().toLowerCase(); }
/** * Creates an Attachment with some of the MIME headers specified. * * @param dataSource the data source * @param contentType the Content-Type header, can be <code>null</code> * @param disposition the Content-Disposition header, can be <code>null</code> */ public Attachment(DataSource dataSource, String contentType, ContentDisposition disposition) { this.dataSource = dataSource; this.contentType = contentType; this.contentDisposition = disposition == null ? null : disposition.toString().toLowerCase(); }