|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.jms.MessageImpl (src)
org.jboss.jms.StreamMessageImpl
| Field Summary |
| Fields inherited from class org.jboss.jms.MessageImpl (src) |
body, deliveryId, type |
| Fields inherited from interface javax.jms.Message (src) |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
| Constructor Summary | |
StreamMessageImpl()
|
|
| Method Summary | |
void |
clearBody()
Clears out the message body. |
boolean |
readBoolean()
Reads a boolean from the stream message. |
byte |
readByte()
Reads a byte value from the stream message. |
int |
readBytes(byte[] value)
Reads a byte array field from the stream message into the specified byte[] object (the read buffer). |
char |
readChar()
Reads a Unicode character value from the stream message. |
double |
readDouble()
Reads a double from the stream message. |
float |
readFloat()
Reads a float from the stream message. |
int |
readInt()
Reads a 32-bit integer from the stream message. |
long |
readLong()
Reads a 64-bit integer from the stream message. |
java.lang.Object |
readObject()
Reads an object from the stream message. |
short |
readShort()
Reads a 16-bit integer from the stream message. |
java.lang.String |
readString()
Reads a String from the stream message. |
void |
reset()
Puts the message body in read-only mode and repositions the stream to the beginning. |
void |
writeBoolean(boolean value)
Writes a boolean to the stream message. |
void |
writeByte(byte value)
Writes a byte to the stream message. |
void |
writeBytes(byte[] value)
Writes a byte array field to the stream message. |
void |
writeBytes(byte[] value,
int offset,
int length)
Writes a portion of a byte array as a byte array field to the stream message. |
void |
writeChar(char value)
Writes a char to the stream message. |
void |
writeDouble(double value)
Writes a double to the stream message. |
void |
writeFloat(float value)
Writes a float to the stream message. |
void |
writeInt(int value)
Writes an int to the stream message. |
void |
writeLong(long value)
Writes a long to the stream message. |
void |
writeObject(java.lang.Object value)
Writes an object to the stream message. |
void |
writeShort(short value)
Writes a short to the stream message. |
void |
writeString(java.lang.String value)
Writes a String to the stream message. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StreamMessageImpl()
| Method Detail |
public final void clearBody()
Message (src) If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.
clearBody in interface Message (src) clearBody in class MessageImpl (src)
public final boolean readBoolean()
throws JMSException (src)
StreamMessage (src) boolean from the stream message.
readBoolean in interface StreamMessage (src) boolean value read
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final byte readByte()
throws JMSException (src)
StreamMessage (src) byte value from the stream message.
readByte in interface StreamMessage (src) byte
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final int readBytes(byte[] value)
throws JMSException (src)
StreamMessage (src) byte[] object (the read buffer).
To read the field value, readBytes should be
successively called
until it returns a value less than the length of the read buffer.
The value of the bytes in the buffer following the last byte
read is undefined.
If readBytes returns a value equal to the length of the
buffer, a subsequent readBytes call must be made. If there
are no more bytes to be read, this call returns -1.
If the byte array field value is null, readBytes
returns -1.
If the byte array field value is empty, readBytes
returns 0.
Once the first readBytes call on a byte[]
field value has been made,
the full value of the field must be read before it is valid to read
the next field. An attempt to read the next field before that has
been done will throw a MessageFormatException.
To read the byte field value into a new byte[] object,
use the readObject method.
readBytes in interface StreamMessage (src) value - the buffer into which the data is read
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.StreamMessage.readObject()
public final char readChar()
throws JMSException (src)
StreamMessage (src)
readChar in interface StreamMessage (src) JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final double readDouble()
throws JMSException (src)
StreamMessage (src) double from the stream message.
readDouble in interface StreamMessage (src) double value from the stream message
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final float readFloat()
throws JMSException (src)
StreamMessage (src) float from the stream message.
readFloat in interface StreamMessage (src) float value from the stream message
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final int readInt()
throws JMSException (src)
StreamMessage (src)
readInt in interface StreamMessage (src) int
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final long readLong()
throws JMSException (src)
StreamMessage (src)
readLong in interface StreamMessage (src) long
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final java.lang.Object readObject()
throws JMSException (src)
StreamMessage (src) This method can be used to return, in objectified format,
an object in the Java programming language ("Java object") that has
been written to the stream with the equivalent
writeObject method call, or its equivalent primitive
writetype method.
Note that byte values are returned as byte[], not
Byte[].
An attempt to call readObject to read a byte field
value into a new byte[] object before the full value of the
byte field has been read will throw a
MessageFormatException.
readObject in interface StreamMessage (src) int,
an Integer is returned)
JMSException (src) - if the JMS provider fails to read the message
due to some internal error.StreamMessage.readBytes(byte[] value)
public final short readShort()
throws JMSException (src)
StreamMessage (src)
readShort in interface StreamMessage (src) JMSException (src) - if the JMS provider fails to read the message
due to some internal error.
public final java.lang.String readString()
throws JMSException (src)
StreamMessage (src) String from the stream message.
readString in interface StreamMessage (src) JMSException (src) - if the JMS provider fails to read the message
due to some internal error.public final void reset()
StreamMessage (src)
reset in interface StreamMessage (src)
public final void writeBoolean(boolean value)
throws JMSException (src)
StreamMessage (src) boolean to the stream message.
The value true is written as the value
(byte)1; the value false is written as
the value (byte)0.
writeBoolean in interface StreamMessage (src) value - the boolean value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeByte(byte value)
throws JMSException (src)
StreamMessage (src) byte to the stream message.
writeByte in interface StreamMessage (src) value - the byte value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeBytes(byte[] value)
throws JMSException (src)
StreamMessage (src) The byte array value is written to the message
as a byte array field. Consecutively written byte array fields are
treated as two distinct fields when the fields are read.
writeBytes in interface StreamMessage (src) value - the byte array value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeBytes(byte[] value,
int offset,
int length)
throws JMSException (src)
StreamMessage (src) The a portion of the byte array value is written to the
message as a byte array field. Consecutively written byte
array fields are treated as two distinct fields when the fields are
read.
writeBytes in interface StreamMessage (src) value - the byte array value to be writtenoffset - the initial offset within the byte arraylength - the number of bytes to use
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeChar(char value)
throws JMSException (src)
StreamMessage (src) char to the stream message.
writeChar in interface StreamMessage (src) value - the char value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeDouble(double value)
throws JMSException (src)
StreamMessage (src) double to the stream message.
writeDouble in interface StreamMessage (src) value - the double value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeFloat(float value)
throws JMSException (src)
StreamMessage (src) float to the stream message.
writeFloat in interface StreamMessage (src) value - the float value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeInt(int value)
throws JMSException (src)
StreamMessage (src) int to the stream message.
writeInt in interface StreamMessage (src) value - the int value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeLong(long value)
throws JMSException (src)
StreamMessage (src) long to the stream message.
writeLong in interface StreamMessage (src) value - the long value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeObject(java.lang.Object value)
throws JMSException (src)
StreamMessage (src) This method works only for the objectified primitive
object types (Integer, Double,
Long ...), String objects, and byte
arrays.
writeObject in interface StreamMessage (src) value - the Java object to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeShort(short value)
throws JMSException (src)
StreamMessage (src) short to the stream message.
writeShort in interface StreamMessage (src) value - the short value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
public final void writeString(java.lang.String value)
throws JMSException (src)
StreamMessage (src) String to the stream message.
writeString in interface StreamMessage (src) value - the String value to be written
JMSException (src) - if the JMS provider fails to write the message
due to some internal error.
|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||