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

Stefano Bagnara commented on MIME4J-6:
--------------------------------------

In the JavaMail/Activation world they use the SharedInputStream to address a 
similar issue.

When the InputStream passed to the parser is a SharedInputStream then it is 
possibile to create child streams at any time by using a reference to the 
original stream and a pos/len parameter. This way it should be possible to keep 
reading stuff from the original source instead of creating temporary files.

When a SharedInputStream is passed Javamail does not need to clone the content 
somewhere else when you need dom access, otherwise Javamail simply copy the 
inputstream to an internal bytearray (and use it via the SharedInputStream 
interface).

Unfortunately we have nested decodings so most time to lazily load some nested 
content you will have to redecode most of the file.

> 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.5
>
>
> 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