public string ReadString()
{
InitializeReading();
try
{
// JMS, CMS and NMS all encode the String using a 16 bit size header.
return dataIn.ReadString16();
}
catch(EndOfStreamException e)
{
throw NMSExceptionSupport.CreateMessageEOFException(e);
}
catch(IOException e)
{
throw NMSExceptionSupport.CreateMessageFormatException(e);
}
}