[JBoss JIRA] Commented: (NETTY-253) Add several usefull getters and setters to ChannelBuffer class
Trustin Lee (JIRA)
jira-events at lists.jboss.org
Wed Nov 25 02:12:29 EST 2009
[ https://jira.jboss.org/jira/browse/NETTY-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12496480#action_12496480 ]
Trustin Lee commented on NETTY-253:
-----------------------------------
I've just added the following methods to ChannelBuffer:
* getChar(), setChar(), readChar(), writeChar()
* getFloat(), setFloat(), readFloat(), writeFloat()
* getDouble(), setDouble(), readDouble(), writeDouble()
* hasArray(), array(), arrayOffset()
Code modification was trivial, but please let me know if any of these methods do not work as expected. SVN revision is 1922. You will be able to grab the build here soon: http://hudson.jboss.org/hudson/view/Netty/job/netty/1011/
> Add several usefull getters and setters to ChannelBuffer class
> --------------------------------------------------------------
>
> Key: NETTY-253
> URL: https://jira.jboss.org/jira/browse/NETTY-253
> Project: Netty
> Issue Type: Feature Request
> Components: Core API
> Affects Versions: 3.1.5.GA
> Reporter: Ruslan Shostak
> Assignee: Trustin Lee
> Fix For: 3.2.0.ALPHA2
>
>
> The proposal is to implement the following methods in ChannelBuffer.
> (comments taken from ByteBuffer class (http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html)
> 1) getChar()
> Reads the next two bytes at this buffer's current position
> 2) getFloat()
> Reads the next four bytes at this buffer's current position,
> composing them into a float value according to the current byte order,
> and then increments the position by four.
> 3) getDouble()
> Reads the next eight bytes at this buffer's current position,
> composing them into a double value according to the current byte order,
> and then increments the position by eight.
> 4) putChar()
> Relative put method for writing a char value
> -putFloat()
> Writes four bytes containing the given float value, in the current byte order, into this buffer at the given index.
> 5) putDouble()
> Writes eight bytes containing the given double value, in the current byte order, into this buffer at the current position, and then increments the position by eight.
> 6) array()
> Returns the byte array that backs this buffer
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the netty-dev
mailing list