[ 
https://issues.apache.org/jira/browse/MIME4J-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528701
 ] 

Niklas Therning commented on MIME4J-6:
--------------------------------------

If the mail is read from disk Mime4j could scan it first to find the boundaries 
of the body parts. It would then store the start and end file positions of each 
part. When a body part is requested it would read that particular portion of 
the message from the file using the start and end positions. The header of each 
part could probably be kept in memory.

One drawback compared to the temporary file solution would be that when using 
temporary files the decoded part data can be stored directly. The decoding is 
only done once. One could also use a hybrid solution: decoded parts are stored 
in temp files the first time they are decoded.

Temporary files would also still have to be used I guess if the message isn't 
read from disk (no underlying FileChannel/RandomAccessFile).

> Loading bodies on demand instead of using temporary files
> ---------------------------------------------------------
>
>                 Key: MIME4J-6
>                 URL: https://issues.apache.org/jira/browse/MIME4J-6
>             Project: Mime4j
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>             Fix For: 0.4
>
>
> Make the DOM-like parser capable of loading bodies (at least large attachment)
> on demand instead of using temporary files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to