* Writes the message header for a Resin message.
*/
private TextMessageImpl readTextMessage(InputStream is)
throws IOException, JMSException
{
TextMessageImpl text = new TextMessageImpl();
if (is == null)
return text;
ByteToChar byteToChar = ByteToChar.create();
int ch;
byteToChar.setEncoding("UTF-8");
while ((ch = is.read()) >= 0) {
byteToChar.addByte(ch);
}
text.setText(byteToChar.getConvertedString());
return text;
}