FileDocCategorySizeDatePackage
DimeMultiPart.javaAPI DocApache Axis 1.41830Sat Apr 22 18:57:28 BST 2006org.apache.axis.attachments

DimeMultiPart

public final class DimeMultiPart extends Object
This class hold all parts of a DIME multipart message.

Fields Summary
static final long
transSize
static final byte
CURRENT_VERSION
protected Vector
parts
Constructors Summary
public DimeMultiPart()

 
      
Methods Summary
public voidaddBodyPart(DimeBodyPart part)

        parts.add(part);
    
public longgetTransmissionSize()

        long size = 0;

        for (int i = parts.size() - 1; i > -1; --i)
            size +=
            ((DimeBodyPart) parts.elementAt(i)).getTransmissionSize(
              transSize);

        return size;  
    
public voidwrite(java.io.OutputStream os)

        int size = parts.size();
        int last = size - 1;

        for (int i = 0; i < size; ++i)
            ((DimeBodyPart) parts.elementAt(i)).write(os,
                (byte) ((i == 0 ? DimeBodyPart.POSITION_FIRST : 
                 (byte) 0)
                    | (i == last ? DimeBodyPart.POSITION_LAST :
                     (byte) 0)), transSize);