5.x does it in MemoryPropertyEditor which is used by Xbean.  There's
nothing fancy, it just parses the values and does some multiplication.

https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/util/MemoryPropertyEditor.java

On Fri, Dec 9, 2016 at 9:28 AM, Clebert Suconic
<[email protected]> wrote:
> I'm fine with manual parsing BTW. It seems easy enough :)
>
>
> But I was wondering about the details.
>
> On Fri, Dec 9, 2016 at 9:27 AM, Clebert Suconic
> <[email protected]> wrote:
>> We can look on the code of course. But what AMQ5 is using for that?
>> any library or that's manual parsing?
>>
>> On Thu, Dec 8, 2016 at 10:25 AM, Fabio Gomes dos Santos
>> <[email protected]> wrote:
>>> I've did some researches about that, and native class of java maybe
>>> satisfying the expectations:
>>>
>>> Example 1:
>>> http://stackoverflow.com/questions/16968587/java-convert-human-readable-size-to-bytes/33288820#33288820
>>>
>>> Example 2:
>>> http://codereview.stackexchange.com/questions/77697/convert-a-formatted-file-size-to-bytes
>>>
>>>
>>> 2016-12-08 12:55 GMT-02:00 Clebert Suconic <[email protected]>:
>>>
>>>> @Fabio do you know of any apache licensed libraries that can be used
>>>> for that? or we would need to make the calculation ourselves?
>>>>
>>>> I
>>>>
>>>> On Thu, Dec 8, 2016 at 9:46 AM, Andy Taylor <[email protected]>
>>>> wrote:
>>>> > good idea
>>>> >
>>>> > On 8 December 2016 at 11:52, Fabio Gomes dos Santos <
>>>> [email protected]>
>>>> > wrote:
>>>> >
>>>> >> Hi guys,
>>>> >>
>>>> >> I've opened ARTEMIS-873, and here ask "you what you think about that
>>>> >> feature".
>>>> >> It's very annoying to be calculating bytes.
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Fábio Santos
>>>> >> [email protected]
>>>> >> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>>>> >>
>>>>
>>>>
>>>>
>>>> --
>>>> Clebert Suconic
>>>>
>>>
>>>
>>>
>>> --
>>> Fábio Santos
>>> [email protected]
>>> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>>
>>
>>
>> --
>> Clebert Suconic
>
>
>
> --
> Clebert Suconic

Reply via email to