String mediaType = stream.getBodyDescriptor().getMimeType() + "; charset=" + stream.getBodyDescriptor().getCharset();
// oftwewel: gebruik getDecodedInputStream
InputStream bodyDataStream;
if (MimeUtil.isQuotedPrintableEncoded(stream.getBodyDescriptor().getTransferEncoding())) {
bodyDataStream = new QuotedPrintableInputStream(new EOLConvertingInputStream(stream.getInputStream(), EOLConvertingInputStream.CONVERT_LF));
} else if (MimeUtil.isBase64Encoding(stream.getBodyDescriptor().getTransferEncoding())) {
bodyDataStream = new Base64InputStream(stream.getInputStream());
} else {
bodyDataStream = stream.getInputStream();
}