- /*
- * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
- package javax.mail;
-
- import java.util.Vector;
- import java.io.InputStream;
- import java.io.OutputStream;
- import java.io.IOException;
- import javax.activation.DataSource;
-
- /**
- * MultipartDataSource is a <code>DataSource</code> that contains body
- * parts. This allows "mail aware" <code>DataContentHandlers</code> to
- * be implemented more efficiently by being aware of such
- * <code>DataSources</code> and using the appropriate methods to access
- * <code>BodyParts</code>. <p>
- *
- * Note that the data of a MultipartDataSource is also available as
- * an input stream. <p>
- *
- * This interface will typically be implemented by providers that
- * preparse multipart bodies, for example an IMAP provider.
- *
- * @version 1.5, 99/12/06
- * @author John Mani
- * @see javax.activation.DataSource
- */
-
- public interface MultipartDataSource extends DataSource {
-
- /**
- * Return the number of enclosed BodyPart objects.
- *
- * @return number of parts
- */
- public int getCount();
-
- /**
- * Get the specified Part. Parts are numbered starting at 0.
- *
- * @param index the index of the desired Part
- * @return the Part
- * @exception IndexOutOfBoundsException if the given index
- * is out of range.
- * @exception MessagingException
- */
- public BodyPart getBodyPart(int index) throws MessagingException;
-
- }