11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 /* 27 * @(#)MimePartDataSource.java 1.9 02/03/27 28 */ 29 30 31 32 package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; 33 34 import java.io.*; 35 import java.net.UnknownServiceException; 36 37 import javax.activation.DataSource; 38 39 import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; 40 41 /** 42 * A utility class that implements a DataSource out of 43 * a MimeBodyPart. This class is primarily meant for service providers. 44 * 45 * @author John Mani 46 */ 47 48 public final class MimePartDataSource implements DataSource { 49 private final MimeBodyPart part; 50 51 /** 52 * Constructor, that constructs a DataSource from a MimeBodyPart. 53 * 54 * @param part body part 55 */ 56 public MimePartDataSource(MimeBodyPart part) { 57 this.part = part; 58 } 59 | 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 /* 27 * @(#)MimePartDataSource.java 1.9 02/03/27 28 */ 29 30 31 package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; 32 33 import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; 34 35 import javax.activation.DataSource; 36 import java.io.IOException; 37 import java.io.InputStream; 38 import java.io.OutputStream; 39 import java.net.UnknownServiceException; 40 41 /** 42 * A utility class that implements a DataSource out of 43 * a MimeBodyPart. This class is primarily meant for service providers. 44 * 45 * @author John Mani 46 */ 47 48 public final class MimePartDataSource implements DataSource { 49 private final MimeBodyPart part; 50 51 /** 52 * Constructor, that constructs a DataSource from a MimeBodyPart. 53 * 54 * @param part body part 55 */ 56 public MimePartDataSource(MimeBodyPart part) { 57 this.part = part; 58 } 59 |