* Reads a stream message.
*/
private StreamMessageImpl readStreamMessage(InputStream is)
throws IOException, JMSException
{
StreamMessageImpl stream = new StreamMessageImpl();
if (is == null)
return stream;
ObjectInputStream in = new ContextLoaderObjectInputStream(is);
try {
while (true) {
Object obj = in.readObject();
stream.writeObject(obj);
}
} catch (EOFException e) {
} catch (Exception e) {
throw new JmsExceptionWrapper(e);
}
in.close();
stream.reset();
return stream;
}