Package javax.jms

Examples of javax.jms.MessageNotReadableException


   * @exception MessageNotReadableException  If the message body is write-only.
   * @exception JMSException  If an exception occurs while reading the bytes.
   */
  public double readDouble() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      return inputStream.readDouble();
    } catch (Exception e) {
      JMSException jE = null;
View Full Code Here


   * @exception MessageNotReadableException  If the message body is write-only.
   * @exception JMSException  If an exception occurs while reading the bytes.
   */
  public int readBytes(byte[] value) throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    int counter = 0;

    try {
      for (int i = 0; i < value.length; i ++) {
View Full Code Here

   * @exception MessageNotReadableException  If the message body is write-only.
   * @exception JMSException  If an exception occurs while reading the bytes.
   */
  public int readBytes(byte[] value, int length) throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    if (length > value.length || length < 0)
      throw new IndexOutOfBoundsException("Invalid length parameter: "
                                          + length);
    int counter = 0;
View Full Code Here

   * @exception MessageNotReadableException  If the message body is write-only.
   * @exception JMSException  If an exception occurs while reading the bytes.
   */
  public String readUTF() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      return inputStream.readUTF();
    } catch (Exception e) {
      JMSException jE = null;
View Full Code Here

  
  
   private void getterCheck(String methodName)
         throws MessageNotReadableException {
      if (this.writeOnly) {
         throw new MessageNotReadableException(ME
               + " writeonly message: not allowed to read on operation '"
               + methodName + "'");
      }
   }
View Full Code Here

   public long getBodyLength() throws JMSException
   {
      if (!bodyReadOnly)
      {
         throw new MessageNotReadableException("The message body is writeonly");
      }
      ((JBossBytesMessage)message).checkRead();
      return ((BytesMessage)message).getBodyLength();
   }
View Full Code Here

   public boolean readBoolean() throws JMSException
   {
      if (!bodyReadOnly)
      {
         throw new MessageNotReadableException("The message body is writeonly");
      }
      ((JBossBytesMessage)message).checkRead();
      return ((BytesMessage)message).readBoolean();
   }
View Full Code Here

   public byte readByte() throws JMSException
   {
      if (!bodyReadOnly)
      {
         throw new MessageNotReadableException("The message body is writeonly");
      }
      ((JBossBytesMessage)message).checkRead();
      return ((BytesMessage)message).readByte();
   }
View Full Code Here

   public int readUnsignedByte() throws JMSException
   {
      if (!bodyReadOnly)
      {
         throw new MessageNotReadableException("The message body is writeonly");
      }
      ((JBossBytesMessage)message).checkRead();
      return ((BytesMessage)message).readUnsignedByte();
   }
View Full Code Here

   public short readShort() throws JMSException
   {
      if (!bodyReadOnly)
      {
         throw new MessageNotReadableException("The message body is writeonly");
      }
      ((JBossBytesMessage)message).checkRead();
      return ((BytesMessage)message).readShort();
   }
View Full Code Here

TOP

Related Classes of javax.jms.MessageNotReadableException

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.