public static String readString(ChannelBuffer buffer, Charset charset)
	{
		String readString = null;
		if (null != buffer && buffer.readableBytes() > 2)
		{
			int length = buffer.readUnsignedShort();
			readString = readString(buffer, length, charset);
		}
		return readString;
	}
public static String readString ( ChannelBuffer buffer , Charset charset ) { String readString = null ; if ( null != buffer && buffer . readableBytes ( ) > 2 ) { int length = buffer . readUnsignedShort ( ) ; readString = readString ( buffer , length , charset ) ; } return readString ; }
This method will first read an unsigned short to find the length of the
string and then read the actual string based on the length. This method
will also reset the reader index to end of the string

@param buffer
The Netty buffer containing at least one unsigned short
followed by a string of similar length.
@param charset
The Charset say 'UTF-8' in which the decoding needs to be
done.
@return Returns the String or throws {@link IndexOutOfBoundsException} if
the length is greater than expected.