You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Tellier Benoit (JIRA)" <mi...@james.apache.org> on 2017/11/28 03:53:00 UTC

[jira] [Created] (MIME4J-264) SingleBody should expose a getSize method.

Tellier Benoit created MIME4J-264:
-------------------------------------

             Summary: SingleBody should expose a getSize method.
                 Key: MIME4J-264
                 URL: https://issues.apache.org/jira/browse/MIME4J-264
             Project: James Mime4j
          Issue Type: Bug
          Components: dom
    Affects Versions: master
            Reporter: Tellier Benoit


Using a bit the dom, I end up dimensioning a byte array stream to write a body in.

Sadly, I don't get any method to retrieve this information.

A quick look at available implementations tells me that SingleBody subclasses rely on String and bytes array. The size information is thus available without effort.

Thus I would find it interesting to expose a singleBody.getSize() method, that would lead to better memory management in James (upon attachment parsing). 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)