Package javax.jms

Examples of javax.jms.MessageNotReadableException


   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public short readShort() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == SHORT)
        return inputStream.readShort();
View Full Code Here


   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public char readChar() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == CHAR)
        return inputStream.readChar();
View Full Code Here

   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public int readInt() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == INT)
        return inputStream.readInt();
View Full Code Here

   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public long readLong() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == LONG)
        return inputStream.readLong();
View Full Code Here

   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public float readFloat() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == FLOAT)
        return inputStream.readFloat();
View Full Code Here

   * @exception JMSException                 internal error
   */
  public double readDouble() throws JMSException
  {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == DOUBLE)
        return inputStream.readDouble();
View Full Code Here

   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public int readBytes(byte[] bytes) throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    if (bytes == nullreturn -1;

    if (bytes.length == 0) return 0;
   
View Full Code Here

   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public String readString() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();
      if (type == STRING)
        return inputStream.readUTF();
View Full Code Here

   * @exception MessageEOFException          Unexpected end of bytes array.
   * @exception JMSException                 internal error
   */
  public Object readObject() throws JMSException {
    if (! RObody)
      throw new MessageNotReadableException("Can't read the message body as"
                                            + " it is write-only.");
    try {
      byte type = inputStream.readByte();

      if (type == BOOLEAN) {
View Full Code Here

    protected void checkReadable() throws MessageNotReadableException
    {
        if (!_readableMessage)
        {
            throw new MessageNotReadableException("You need to call reset() to make the message readable");
        }
    }
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.