On Sun, Jan 30, 2011 at 7:40 PM, Stefano Bagnara <io@bago.org> wrote:
> IIRC mime4j 0.6 by default used temporary files to store bodies
> whenever the body was large (switchable through the use of a system
> property). Instead with your latest changes mime4j uses in memory byte
> arrays unless the user provides a custom "BodyFactory" implementation
> to the MessageServiceFactory.
>
> This change in the default way mime4j deals with parsing and
> memory/storage is something that deserved its own thread as it's not a
> API refactoring like the others.
I'm not very enthusiastic but I would prefer to keep the previous
design. I think it is good out-of-the-box behavior if mime4j keeps
smaller messages in memory and automatically stores larger ones on
disk.
The motivation probably is to make DOM independent of storage but I
don't think that's really necessary. One could think of storage as
part of DOM (or at least part of a certain DOM implementation) that
can also be used standalone. If you really wanted to remove that
dependency maybe dom and dom-impl modules would do it?
Cheers,
Markus
|