james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rustam Aliyev <rus...@code.az>
Subject Re: MIME part size
Date Sun, 17 Jul 2011 23:40:02 GMT
Hi Norman,

BodyDescriptor only has getContentLength() which returns "Content 
length, if known, or -1, to indicate the absence of a content-length 
header".

Taking into account that most of attachment don't have content-length, 
this won't be very helpful.   ... or am I missing somehitng?


Thanks,
Rustam.

On 17/07/2011 19:23, Norman Maurer wrote:
> Hi there,
>
> this should be possible with the BodyDescriptor.
>
> http://james.apache.org/mime4j/apidocs/org/apache/james/mime4j/descriptor/BodyDescriptor.html
>
> Bye,
> Norman
>
>
> 2011/7/16 Rustam Aliyev<rustam@code.az>:
>> Hi,
>>
>> First of all, sorry for addressing this question to the dev group, but I was
>> unable to find any mime4j user groups.
>>
>> I need to get MIME part size (e.g. size of attachment/BinaryBody) but can't
>> figure out how to do it. At the moment I use DOM parser and then read
>> through part.getBody().getInputStream() to calculate its size. Clearly this
>> is not the best way.
>>
>> Also, is it possible to get mime encoded size as well as original (decoded)
>> size?
>>
>> PS: I'm using latest 0.7 snapshot.
>>
>> Regards,
>> Rustam.
>>
>> <http://www.linkedin.com/in/aliyev>
>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message