code: public static String readString(ChannelBuffer buffer, int length,
  			Charset charset)
  	{
  		String str = null;
  		if (null == charset)
  		{
  			charset = CharsetUtil.UTF_8;
  		}
  		try
  		{
  			ChannelBuffer stringBuffer = buffer.readSlice(length);
  			str = stringBuffer.toString(charset);
  		}
  		catch (Exception e)
  		{
  			throw new RuntimeException(e);
  		}
  		return str;
  	}
docs: Read a string from a channel buffer with the specified length. It resets
  the reader index of the buffer to the end of the string. Defaults to
  UTF-8 encoding in case charset passed in is null
  
  @param buffer
  The Netty buffer containing the String.
  @param length
  The number of bytes in the String.
  @param charset
  The Charset say 'UTF-8' in which the decoding needs to be
  done.
  @return Returns the read string.