getLengthOfParts(Part[] parts) Return the total sum of all parts and that of the last boundary
Parameters: parts - The parts.
public static long
getLengthOfParts(Part[] parts, byte[] partBoundary) Gets the length of the multipart message including the given parts.
Parameters: parts - The parts. Parameters: partBoundary - The ASCII bytes to use as the part boundary.
Return the total sum of all parts and that of the last boundary
Parameters: parts - The parts. The total length throws: IOException - If an I/O error occurs while writing the parts.
getLengthOfParts
public static long getLengthOfParts(Part[] parts, byte[] partBoundary) throws IOException(Code)
Gets the length of the multipart message including the given parts.
Parameters: parts - The parts. Parameters: partBoundary - The ASCII bytes to use as the part boundary. The total length throws: IOException - If an I/O error occurs while writing the parts. since: 3.0
Return the full length of all the data.
If you override this method make sure to override
#send(OutputStream) as well
long The length. throws: IOException - If an IO problem occurs
Write all the data to the output stream.
If you override this method make sure to override
#length() as well
Parameters: out - The output stream throws: IOException - If an IO problem occurs.
Write all parts and the last boundary to the specified output stream.
Parameters: out - The stream to write to. Parameters: parts - The parts to write. throws: IOException - If an I/O error occurs while writing the parts.
Write all parts and the last boundary to the specified output stream.
Parameters: out - The stream to write to. Parameters: parts - The parts to write. Parameters: partBoundary - The ASCII bytes to use as the part boundary. throws: IOException - If an I/O error occurs while writing the parts. since: 3.0
Write the content transfer encoding header to the specified
output stream
Parameters: out - The output stream throws: IOException - If an IO problem occurs.