Package com.caucho.jms.message

Examples of com.caucho.jms.message.StreamMessageImpl


   * 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;
  }
View Full Code Here


  public StreamMessage createStreamMessage()
    throws JMSException
  {
    checkOpen();
   
    return new StreamMessageImpl();
  }
View Full Code Here

  public StreamMessage createStreamMessage()
    throws JMSException
  {
    checkOpen();
   
    return new StreamMessageImpl();
  }
View Full Code Here

   * 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;
  }
View Full Code Here

TOP

Related Classes of com.caucho.jms.message.StreamMessageImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.