netty/netty — pull request #362 by CruzBishop (2012-05-23 23:19:50+00:00)
Title: Add support for reading and writing strings and sets of characters

This pull request adds the following methods:

* getChars(int index, int characterCount)
* getString(int index)

* setChars(int index, String value)
* setString(int index, String value)

* readChars(int characterCount)
* readString()

* writeChars(String value)
* writeString(String value)

Each *Chars method simply reads/writes a set of UTF-16 characters.

Each *String method reads/writes a 16-bit unsigned short (0-65535?) to determine the number of characters to read, then reads that number of characters

This saves the pain of having to manually write each short value of each character in sequence or opening a data stream (ChannelBufferDataStream? I don't remember the name now)