mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francis ANDRE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRMINA-823) Add IoBuffer.putUnsigned* methods to balance the getUnsigned* methods for completeness
Date Tue, 15 Mar 2011 06:29:36 GMT

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

Francis ANDRE commented on DIRMINA-823:
---------------------------------------

For the same reason that Mina provides the getUnsignedShort(), getUnsignedMiddleInt() and
getUnsignedInt(): lisibility and share of the code...

Otherwise, why Mina provides putInt(), putMiddleInt(), putShort() if not for a better lisibility
and clean code??? All thoses methods can be expressed by a combination of one or more put(byte
b) but the resulting code is quite a bit clumsy. So, the same reasons should apply: lisibility,
evidence of the semantic, share of the code, and clean resulting code.




> Add IoBuffer.putUnsigned* methods to balance the getUnsigned* methods for completeness
> --------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-823
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-823
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.2
>         Environment: WXP SP3, Sun SDK 1.5
>            Reporter: Francis ANDRE
>            Priority: Trivial
>
> While unsigned integers types are quite meaningful in  networking protocols,  Java does
not provide unsigned integer primitive types. The IoBuffer.getUnsigned* methods are filling
the gap between the need of  unsigned integers and the real Java programs.
> But IoBuffer does not provide the correlative IoBuffer.putUnsigned* methods. Thus for
completeness, this issue proposes to add those IoBuffer.putUnsigned* methods.
> Rgds

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

Mime
View raw message