List of usage examples for javax.jms MessageEOFException MessageEOFException
public MessageEOFException(String reason)
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a <code>boolean</code> from the bytes message stream. * //from w ww.jav a 2 s . c o m * @return the <code>boolean</code> value * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public boolean readBoolean() throws JMSException { checkCanRead(); try { return dataIn.readBoolean(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a signed 8-bit value from the bytes message stream. * //from www . ja va2 s . c om * @return the next byte from the bytes message stream as a signed 8-bit * byte * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public byte readByte() throws JMSException { checkCanRead(); try { return dataIn.readByte(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads an unsigned 8-bit value from the bytes message stream. * /*from www . ja v a 2s . co m*/ * @return the next byte from the bytes message stream, interpreted as an * unsigned 8-bit number * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public int readUnsignedByte() throws JMSException { checkCanRead(); try { return dataIn.readUnsignedByte(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a signed 16-bit number from the bytes message stream. * // w w w.ja v a 2 s . c o m * @return the next two bytes from the bytes message stream, interpreted as * a signed 16-bit number * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public short readShort() throws JMSException { checkCanRead(); try { return dataIn.readShort(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads an unsigned 16-bit number from the bytes message stream. * /*from w w w. j a v a 2s . com*/ * @return the next two bytes from the bytes message stream, interpreted as * an unsigned 16-bit integer * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public int readUnsignedShort() throws JMSException { checkCanRead(); try { return dataIn.readUnsignedShort(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a Unicode character value from the bytes message stream. * // w w w . j av a 2 s . co m * @return a Unicode character from the bytes message stream * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public char readChar() throws JMSException { checkCanRead(); try { return dataIn.readChar(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a 32-bit integer from the bytes message stream. * // w w w .j ava 2s.c om * @return the next four bytes from the bytes message stream, interpreted as an int * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public int readInt() throws JMSException { checkCanRead(); try { return dataIn.readInt(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a 64-bit integer from the bytes message stream. * //from w ww .j av a 2s . c o m * @return a 64-bit integer value from the bytes message stream, interpreted as a long * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public long readLong() throws JMSException { checkCanRead(); try { return dataIn.readLong(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a <code>float</code> from the bytes message stream. * // w w w . j av a 2 s . co m * @return a <code>float</code> value from the bytes message stream * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public float readFloat() throws JMSException { checkCanRead(); try { return dataIn.readFloat(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }
From source file:com.amazon.sqs.javamessaging.message.SQSBytesMessage.java
/** * Reads a <code>double</code> from the bytes message stream. * //from ww w . j a va 2s . c om * @return a <code>double</code> value from the bytes message stream * @throws JMSException * If the JMS provider fails to read the message due to some * internal error. * @throws MessageEOFException * If unexpected end of bytes stream has been reached. * @throws MessageNotReadableException * If the message is in write-only mode. */ @Override public double readDouble() throws JMSException { checkCanRead(); try { return dataIn.readDouble(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } }