jodd-mail/src/main/java/jodd/mail/EmailAttachment.java
public void writeToFile(final File destination) {
		InputStream input = null;
		final OutputStream output;
		try {
			input = getDataSource().getInputStream();
			output = new FileOutputStream(destination);

			StreamUtil.copy(input, output);
		}
		catch (final IOException ioex) {
			throw new MailException(ioex);
		}
		finally {
			StreamUtil.close(input);
		}
	}
public void writeToFile(final File destination) {
		InputStream input = null;
		final OutputStream output;
		try {
			input = getDataSource().getInputStream();
			output = new FileOutputStream(destination);

			StreamUtil.copy(input, output);
		}
		catch (final IOException ioex) {
			throw new MailException(ioex);
		}
		finally {
			StreamUtil.close(input);
		}
	}
Saves attachment to a file.

@param destination The destination file to be written.