| org.bouncycastle.mail.smime.util.FileBackedMimeBodyPart
FileBackedMimeBodyPart | public class FileBackedMimeBodyPart extends MimeBodyPart (Code) | | |
Method Summary | |
public void | dispose() Close off the underlying shared streams and remove the backing file. | public void | writeTo(OutputStream out) |
FileBackedMimeBodyPart | public FileBackedMimeBodyPart(File file) throws MessagingException, IOException(Code) | | Create a MimeBodyPart backed by the data in file.
Parameters: file - file containing the body part. throws: MessagingException - an exception occurs parsing file. throws: IOException - an exception occurs accessing file. |
FileBackedMimeBodyPart | public FileBackedMimeBodyPart(InputStream content, File file) throws MessagingException, IOException(Code) | | Create a MimeBodyPart backed by file based on the headers and
content data in content.
Parameters: content - an inputstream containing the body part. Parameters: file - a handle to the backing file to use for storage. throws: MessagingException - an exception occurs parsing the resulting body part in file. throws: IOException - an exception occurs accessing file or content. |
FileBackedMimeBodyPart | public FileBackedMimeBodyPart(InternetHeaders headers, InputStream body, File file) throws MessagingException, IOException(Code) | | Create a MimeBodyPart backed by file, with the headers
given in headers and body content taken from the stream body.
Parameters: headers - headers for the body part. Parameters: body - internal content for the body part. Parameters: file - backing file to use. throws: MessagingException - if the body part can't be produced. throws: IOException - if there is an issue reading stream or writing to file. |
dispose | public void dispose() throws IOException(Code) | | Close off the underlying shared streams and remove the backing file.
throws: IOException - if streams cannot be closed or the file cannot be deleted. |
|
|