ByteStream from MIMEEntity not correct

Hi,

I want to manage ressources (=files) in my Notes DB. I import them (with LotusScript) by generating a new document containing a multipart MIME entity.

I want to read out the files as byte streams using the Java Notes API. For that, I use MIMEEntity#getInputStream. Unfortunately, the InputStream is manipulated. E.g. my file has 50507 bytes (the Content-Length-Header contains this value), but the InputStream only contains 47040 bytes. There is no encoding used, and explicitly calling the decodeContent()-method does not solve the problem. The problem occurs for both local and remote access.

Why don’t I get the correct count of 50507 bytes from the MIME Entity?