public class

FileBackedMimeBodyPart

extends MimeBodyPart
java.lang.Object
   ↳ MimeBodyPart
     ↳ org.bouncycastle.mail.smime.util.FileBackedMimeBodyPart

Summary

Public Constructors
FileBackedMimeBodyPart(File file)
Create a MimeBodyPart backed by the data in file.
FileBackedMimeBodyPart(InputStream content, File file)
Create a MimeBodyPart backed by file based on the headers and content data in content.
FileBackedMimeBodyPart(InternetHeaders headers, InputStream body, File file)
Create a MimeBodyPart backed by file, with the headers given in headers and body content taken from the stream body.
Public Methods
void dispose()
Close off the underlying shared streams and remove the backing file.
void writeTo(OutputStream out)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FileBackedMimeBodyPart (File file)

Create a MimeBodyPart backed by the data in file.

Parameters
file file containing the body part.
Throws
an exception occurs parsing file.
IOException an exception occurs accessing file.
MessagingException

public FileBackedMimeBodyPart (InputStream content, File file)

Create a MimeBodyPart backed by file based on the headers and content data in content.

Parameters
content an inputstream containing the body part.
file a handle to the backing file to use for storage.
Throws
an exception occurs parsing the resulting body part in file.
IOException an exception occurs accessing file or content.
MessagingException

public FileBackedMimeBodyPart (InternetHeaders headers, InputStream body, File file)

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.
body internal content for the body part.
file backing file to use.
Throws
if the body part can't be produced.
IOException if there is an issue reading stream or writing to file.
MessagingException

Public Methods

public void dispose ()

Close off the underlying shared streams and remove the backing file.

Throws
IOException if streams cannot be closed or the file cannot be deleted.

public void writeTo (OutputStream out)

Throws
IOException
MessagingException