[ 
https://issues.apache.org/jira/browse/DEFT-167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069443#comment-13069443
 ] 

Séven Le Mesle commented on DEFT-167:
-------------------------------------

Beware that the request body can use a different Charset. Headers are always 
US_ASCII but that can be quiet different for the body.
Also notice that decoder has an internal state that should be flushed after 
use. The JavaDoc recommends to call first the reset method.
See 
http://download.oracle.com/javase/6/docs/api/java/nio/charset/CharsetDecoder.html


> Use CharsetDecoder to convert ByteBuffer to String
> --------------------------------------------------
>
>                 Key: DEFT-167
>                 URL: https://issues.apache.org/jira/browse/DEFT-167
>             Project: Deft
>          Issue Type: Improvement
>            Reporter: Michele Zuccalà
>            Priority: Minor
>
> My research has shown that CharsetDecoders are much faster for the conversion 
> of a ByteBuffer into a String.
> Take a look here for this simple improvement:
> https://github.com/ilmich/deft/commit/6914e922051d4e0e050a58daea2790091c236b7c

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to