[JBoss JIRA] Created: (NETTY-253) Add several usefull getters and setters to ChannelBuffer class
Ruslan Shostak (JIRA)
jira-events at lists.jboss.org
Tue Nov 17 05:33:29 EST 2009
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
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