throw new MessageNotReadableException("Can't read the message body as"
+ " it is write-only.");
try {
return inputStream.readUnsignedShort();
} catch (Exception e) {
JMSException jE = null;
if (e instanceof EOFException)
jE = new MessageEOFException("Unexpected end of bytes array.");
else if (e instanceof IOException)
jE = new JMSException("Could not read the bytes array.");
jE.setLinkedException(e);
throw jE;
}
}