blob: 0124bd6287acb8cad65cec4dbb806e5b4abe7741 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>BytesMessage</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BytesMessage";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../javax/jms/CompletionListener.html" title="interface in javax.jms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javax/jms/BytesMessage.html" target="_top">Frames</a></li>
<li><a href="BytesMessage.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javax.jms</div>
<h2 title="Interface BytesMessage" class="title">Interface BytesMessage</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../javax/jms/Message.html" title="interface in javax.jms">Message</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../org/apache/openejb/resource/activemq/jms2/WrappingByteMessage.html" title="class in org.apache.openejb.resource.activemq.jms2">WrappingByteMessage</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">BytesMessage</span>
extends <a href="../../javax/jms/Message.html" title="interface in javax.jms">Message</a></pre>
<div class="block">A <code>BytesMessage</code> object is used to send a message containing a stream of uninterpreted bytes. It inherits from
the <code>Message</code> interface and adds a bytes message body. The receiver of the message supplies the interpretation
of the bytes.
<p>
The <code>BytesMessage</code> methods are based largely on those found in <code>java.io.DataInputStream</code> and
<code>java.io.DataOutputStream</code>.
<p>
This message type is for client encoding of existing message formats. If possible, one of the other self-defining
message types should be used instead.
<p>
Although the JMS API allows the use of message properties with byte messages, they are typically not used, since the
inclusion of properties may affect the format.
<p>
The primitive types can be written explicitly using methods for each type. They may also be written generically as
objects. For instance, a call to <code>BytesMessage.writeInt(6)</code> is equivalent to
<code>BytesMessage.writeObject(new Integer(6))</code>. Both forms are provided, because the explicit form is convenient
for static programming, and the object form is needed when types are not known at compile time.
<p>
When the message is first created, and when <code>clearBody</code> is called, the body of the message is in write-only
mode. After the first call to <code>reset</code> has been made, the message body is in read-only mode. When a
<code>BytesMessage</code> is sent asynchronously, the provider must call <code>reset</code> on the <code>BytesMessage</code> passed
to the <code>CompletionListener</code>. This means that the <code>CompletionListener</code> can read the message body without
needing to call <code>reset</code>. After a message has been sent, the client that sent it can retain and modify it
without affecting the message that has been sent. The same message object can be sent multiple times. When a message
has been received, the provider has called <code>reset</code> so that the message body is in read-only mode for the
client.
<p>
If <code>clearBody</code> is called on a message in read-only mode, the message body is cleared and the message is in
write-only mode.
<p>
If a client attempts to read a message in write-only mode, a <code>MessageNotReadableException</code> is thrown.
<p>
If a client attempts to write a message in read-only mode, a <code>MessageNotWriteableException</code> is thrown.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 1.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javax/jms/Session.html#createBytesMessage--"><code>Session.createBytesMessage()</code></a>,
<a href="../../javax/jms/MapMessage.html" title="interface in javax.jms"><code>MapMessage</code></a>,
<a href="../../javax/jms/Message.html" title="interface in javax.jms"><code>Message</code></a>,
<a href="../../javax/jms/ObjectMessage.html" title="interface in javax.jms"><code>ObjectMessage</code></a>,
<a href="../../javax/jms/StreamMessage.html" title="interface in javax.jms"><code>StreamMessage</code></a>,
<a href="../../javax/jms/TextMessage.html" title="interface in javax.jms"><code>TextMessage</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.javax.jms.Message">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;javax.jms.<a href="../../javax/jms/Message.html" title="interface in javax.jms">Message</a></h3>
<code><a href="../../javax/jms/Message.html#DEFAULT_DELIVERY_DELAY">DEFAULT_DELIVERY_DELAY</a>, <a href="../../javax/jms/Message.html#DEFAULT_DELIVERY_MODE">DEFAULT_DELIVERY_MODE</a>, <a href="../../javax/jms/Message.html#DEFAULT_PRIORITY">DEFAULT_PRIORITY</a>, <a href="../../javax/jms/Message.html#DEFAULT_TIME_TO_LIVE">DEFAULT_TIME_TO_LIVE</a></code></li>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#getBodyLength--">getBodyLength</a></span>()</code>
<div class="block">Gets the number of bytes of the message body when the message is in read-only mode.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readBoolean--">readBoolean</a></span>()</code>
<div class="block">Reads a <code>boolean</code> from the bytes message stream.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readByte--">readByte</a></span>()</code>
<div class="block">Reads a signed 8-bit value from the bytes message stream.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readBytes-byte:A-">readBytes</a></span>(byte[]&nbsp;value)</code>
<div class="block">Reads a byte array from the bytes message stream.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readBytes-byte:A-int-">readBytes</a></span>(byte[]&nbsp;value,
int&nbsp;length)</code>
<div class="block">Reads a portion of the bytes message stream.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readChar--">readChar</a></span>()</code>
<div class="block">Reads a Unicode character value from the bytes message stream.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readDouble--">readDouble</a></span>()</code>
<div class="block">Reads a <code>double</code> from the bytes message stream.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readFloat--">readFloat</a></span>()</code>
<div class="block">Reads a <code>float</code> from the bytes message stream.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readInt--">readInt</a></span>()</code>
<div class="block">Reads a signed 32-bit integer from the bytes message stream.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readLong--">readLong</a></span>()</code>
<div class="block">Reads a signed 64-bit integer from the bytes message stream.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readShort--">readShort</a></span>()</code>
<div class="block">Reads a signed 16-bit number from the bytes message stream.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readUnsignedByte--">readUnsignedByte</a></span>()</code>
<div class="block">Reads an unsigned 8-bit number from the bytes message stream.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readUnsignedShort--">readUnsignedShort</a></span>()</code>
<div class="block">Reads an unsigned 16-bit number from the bytes message stream.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#readUTF--">readUTF</a></span>()</code>
<div class="block">Reads a string that has been encoded using a modified UTF-8 format from the bytes message stream.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#reset--">reset</a></span>()</code>
<div class="block">Puts the message body in read-only mode and repositions the stream of bytes to the beginning.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeBoolean-boolean-">writeBoolean</a></span>(boolean&nbsp;value)</code>
<div class="block">Writes a <code>boolean</code> to the bytes message stream as a 1-byte value.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeByte-byte-">writeByte</a></span>(byte&nbsp;value)</code>
<div class="block">Writes a <code>byte</code> to the bytes message stream as a 1-byte value.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeBytes-byte:A-">writeBytes</a></span>(byte[]&nbsp;value)</code>
<div class="block">Writes a byte array to the bytes message stream.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeBytes-byte:A-int-int-">writeBytes</a></span>(byte[]&nbsp;value,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Writes a portion of a byte array to the bytes message stream.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeChar-char-">writeChar</a></span>(char&nbsp;value)</code>
<div class="block">Writes a <code>char</code> to the bytes message stream as a 2-byte value, high byte first.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeDouble-double-">writeDouble</a></span>(double&nbsp;value)</code>
<div class="block">Converts the <code>double</code> argument to a <code>long</code> using the <code>doubleToLongBits</code> method in class
<code>Double</code>, and then writes that <code>long</code> value to the bytes message stream as an 8-byte quantity, high byte
first.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeFloat-float-">writeFloat</a></span>(float&nbsp;value)</code>
<div class="block">Converts the <code>float</code> argument to an <code>int</code> using the <code>floatToIntBits</code> method in class <code>Float</code>,
and then writes that <code>int</code> value to the bytes message stream as a 4-byte quantity, high byte first.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeInt-int-">writeInt</a></span>(int&nbsp;value)</code>
<div class="block">Writes an <code>int</code> to the bytes message stream as four bytes, high byte first.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeLong-long-">writeLong</a></span>(long&nbsp;value)</code>
<div class="block">Writes a <code>long</code> to the bytes message stream as eight bytes, high byte first.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeObject-java.lang.Object-">writeObject</a></span>(java.lang.Object&nbsp;value)</code>
<div class="block">Writes an object to the bytes message stream.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeShort-short-">writeShort</a></span>(short&nbsp;value)</code>
<div class="block">Writes a <code>short</code> to the bytes message stream as two bytes, high byte first.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jms/BytesMessage.html#writeUTF-java.lang.String-">writeUTF</a></span>(java.lang.String&nbsp;value)</code>
<div class="block">Writes a string to the bytes message stream using UTF-8 encoding in a machine-independent manner.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.jms.Message">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;javax.jms.<a href="../../javax/jms/Message.html" title="interface in javax.jms">Message</a></h3>
<code><a href="../../javax/jms/Message.html#acknowledge--">acknowledge</a>, <a href="../../javax/jms/Message.html#clearBody--">clearBody</a>, <a href="../../javax/jms/Message.html#clearProperties--">clearProperties</a>, <a href="../../javax/jms/Message.html#getBody-java.lang.Class-">getBody</a>, <a href="../../javax/jms/Message.html#getBooleanProperty-java.lang.String-">getBooleanProperty</a>, <a href="../../javax/jms/Message.html#getByteProperty-java.lang.String-">getByteProperty</a>, <a href="../../javax/jms/Message.html#getDoubleProperty-java.lang.String-">getDoubleProperty</a>, <a href="../../javax/jms/Message.html#getFloatProperty-java.lang.String-">getFloatProperty</a>, <a href="../../javax/jms/Message.html#getIntProperty-java.lang.String-">getIntProperty</a>, <a href="../../javax/jms/Message.html#getJMSCorrelationID--">getJMSCorrelationID</a>, <a href="../../javax/jms/Message.html#getJMSCorrelationIDAsBytes--">getJMSCorrelationIDAsBytes</a>, <a href="../../javax/jms/Message.html#getJMSDeliveryMode--">getJMSDeliveryMode</a>, <a href="../../javax/jms/Message.html#getJMSDeliveryTime--">getJMSDeliveryTime</a>, <a href="../../javax/jms/Message.html#getJMSDestination--">getJMSDestination</a>, <a href="../../javax/jms/Message.html#getJMSExpiration--">getJMSExpiration</a>, <a href="../../javax/jms/Message.html#getJMSMessageID--">getJMSMessageID</a>, <a href="../../javax/jms/Message.html#getJMSPriority--">getJMSPriority</a>, <a href="../../javax/jms/Message.html#getJMSRedelivered--">getJMSRedelivered</a>, <a href="../../javax/jms/Message.html#getJMSReplyTo--">getJMSReplyTo</a>, <a href="../../javax/jms/Message.html#getJMSTimestamp--">getJMSTimestamp</a>, <a href="../../javax/jms/Message.html#getJMSType--">getJMSType</a>, <a href="../../javax/jms/Message.html#getLongProperty-java.lang.String-">getLongProperty</a>, <a href="../../javax/jms/Message.html#getObjectProperty-java.lang.String-">getObjectProperty</a>, <a href="../../javax/jms/Message.html#getPropertyNames--">getPropertyNames</a>, <a href="../../javax/jms/Message.html#getShortProperty-java.lang.String-">getShortProperty</a>, <a href="../../javax/jms/Message.html#getStringProperty-java.lang.String-">getStringProperty</a>, <a href="../../javax/jms/Message.html#isBodyAssignableTo-java.lang.Class-">isBodyAssignableTo</a>, <a href="../../javax/jms/Message.html#propertyExists-java.lang.String-">propertyExists</a>, <a href="../../javax/jms/Message.html#setBooleanProperty-java.lang.String-boolean-">setBooleanProperty</a>, <a href="../../javax/jms/Message.html#setByteProperty-java.lang.String-byte-">setByteProperty</a>, <a href="../../javax/jms/Message.html#setDoubleProperty-java.lang.String-double-">setDoubleProperty</a>, <a href="../../javax/jms/Message.html#setFloatProperty-java.lang.String-float-">setFloatProperty</a>, <a href="../../javax/jms/Message.html#setIntProperty-java.lang.String-int-">setIntProperty</a>, <a href="../../javax/jms/Message.html#setJMSCorrelationID-java.lang.String-">setJMSCorrelationID</a>, <a href="../../javax/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-">setJMSCorrelationIDAsBytes</a>, <a href="../../javax/jms/Message.html#setJMSDeliveryMode-int-">setJMSDeliveryMode</a>, <a href="../../javax/jms/Message.html#setJMSDeliveryTime-long-">setJMSDeliveryTime</a>, <a href="../../javax/jms/Message.html#setJMSDestination-javax.jms.Destination-">setJMSDestination</a>, <a href="../../javax/jms/Message.html#setJMSExpiration-long-">setJMSExpiration</a>, <a href="../../javax/jms/Message.html#setJMSMessageID-java.lang.String-">setJMSMessageID</a>, <a href="../../javax/jms/Message.html#setJMSPriority-int-">setJMSPriority</a>, <a href="../../javax/jms/Message.html#setJMSRedelivered-boolean-">setJMSRedelivered</a>, <a href="../../javax/jms/Message.html#setJMSReplyTo-javax.jms.Destination-">setJMSReplyTo</a>, <a href="../../javax/jms/Message.html#setJMSTimestamp-long-">setJMSTimestamp</a>, <a href="../../javax/jms/Message.html#setJMSType-java.lang.String-">setJMSType</a>, <a href="../../javax/jms/Message.html#setLongProperty-java.lang.String-long-">setLongProperty</a>, <a href="../../javax/jms/Message.html#setObjectProperty-java.lang.String-java.lang.Object-">setObjectProperty</a>, <a href="../../javax/jms/Message.html#setShortProperty-java.lang.String-short-">setShortProperty</a>, <a href="../../javax/jms/Message.html#setStringProperty-java.lang.String-java.lang.String-">setStringProperty</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getBodyLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBodyLength</h4>
<pre>long&nbsp;getBodyLength()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Gets the number of bytes of the message body when the message is in read-only mode. The value returned can be used to
allocate a byte array. The value returned is the entire length of the message body, regardless of where the pointer
for reading the message is currently located.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of bytes in the message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JMS 1.1</dd>
</dl>
</li>
</ul>
<a name="readBoolean--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBoolean</h4>
<pre>boolean&nbsp;readBoolean()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a <code>boolean</code> from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>boolean</code> value read</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readByte--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByte</h4>
<pre>byte&nbsp;readByte()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a signed 8-bit value from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next byte from the bytes message stream as a signed 8-bit <code>byte</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readUnsignedByte--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnsignedByte</h4>
<pre>int&nbsp;readUnsignedByte()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads an unsigned 8-bit number from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next byte from the bytes message stream, interpreted as an unsigned 8-bit number</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readShort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readShort</h4>
<pre>short&nbsp;readShort()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a signed 16-bit number from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next two bytes from the bytes message stream, interpreted as a signed 16-bit number</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readUnsignedShort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnsignedShort</h4>
<pre>int&nbsp;readUnsignedShort()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads an unsigned 16-bit number from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next two bytes from the bytes message stream, interpreted as an unsigned 16-bit integer</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readChar--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readChar</h4>
<pre>char&nbsp;readChar()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a Unicode character value from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next two bytes from the bytes message stream as a Unicode character</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readInt--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readInt</h4>
<pre>int&nbsp;readInt()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a signed 32-bit integer from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next four bytes from the bytes message stream, interpreted as an <code>int</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readLong--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLong</h4>
<pre>long&nbsp;readLong()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a signed 64-bit integer from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next eight bytes from the bytes message stream, interpreted as a <code>long</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readFloat--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFloat</h4>
<pre>float&nbsp;readFloat()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a <code>float</code> from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next four bytes from the bytes message stream, interpreted as a <code>float</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readDouble--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readDouble</h4>
<pre>double&nbsp;readDouble()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a <code>double</code> from the bytes message stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next eight bytes from the bytes message stream, interpreted as a <code>double</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readUTF--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUTF</h4>
<pre>java.lang.String&nbsp;readUTF()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a string that has been encoded using a modified UTF-8 format from the bytes message stream.
<p>
For more information on the UTF-8 format, see "File System Safe UCS Transformation Format (FSS_UTF)", X/Open
Preliminary Specification, X/Open Company Ltd., Document Number: P316. This information also appears in ISO/IEC
10646, Annex P.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Unicode string from the bytes message stream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</a></code> - if unexpected end of bytes stream has been reached.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readBytes-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre>int&nbsp;readBytes(byte[]&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a byte array from the bytes message stream.
<p>
If the length of array <code>value</code> is less than the number of bytes remaining to be read from the stream, the array
should be filled. A subsequent call reads the next increment, and so on.
<p>
If the number of bytes remaining in the stream is less than the length of array <code>value</code>, the bytes should be
read into the array. The return value of the total number of bytes read will be less than the length of the array,
indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the buffer into which the data is read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream
has been reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readBytes-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre>int&nbsp;readBytes(byte[]&nbsp;value,
int&nbsp;length)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Reads a portion of the bytes message stream.
<p>
If the length of array <code>value</code> is less than the number of bytes remaining to be read from the stream, the array
should be filled. A subsequent call reads the next increment, and so on.
<p>
If the number of bytes remaining in the stream is less than the length of array <code>value</code>, the bytes should be
read into the array. The return value of the total number of bytes read will be less than the length of the array,
indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.
<p>
If <code>length</code> is negative, or <code>length</code> is greater than the length of the array <code>value</code>, then an
<code>IndexOutOfBoundsException</code> is thrown. No bytes will be read from the stream for this exception case.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the buffer into which the data is read</dd>
<dd><code>length</code> - the number of bytes to read; must be less than or equal to <code>value.length</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream
has been reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeBoolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBoolean</h4>
<pre>void&nbsp;writeBoolean(boolean&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a <code>boolean</code> to the bytes message stream as a 1-byte value. The value <code>true</code> is written as the
value <code>(byte)1</code>; the value <code>false</code> is written as the value <code>(byte)0</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>boolean</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeByte-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByte</h4>
<pre>void&nbsp;writeByte(byte&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a <code>byte</code> to the bytes message stream as a 1-byte value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>byte</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeShort-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeShort</h4>
<pre>void&nbsp;writeShort(short&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a <code>short</code> to the bytes message stream as two bytes, high byte first.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>short</code> to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeChar-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeChar</h4>
<pre>void&nbsp;writeChar(char&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a <code>char</code> to the bytes message stream as a 2-byte value, high byte first.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>char</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeInt-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeInt</h4>
<pre>void&nbsp;writeInt(int&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes an <code>int</code> to the bytes message stream as four bytes, high byte first.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>int</code> to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeLong-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLong</h4>
<pre>void&nbsp;writeLong(long&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a <code>long</code> to the bytes message stream as eight bytes, high byte first.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>long</code> to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeFloat-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeFloat</h4>
<pre>void&nbsp;writeFloat(float&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Converts the <code>float</code> argument to an <code>int</code> using the <code>floatToIntBits</code> method in class <code>Float</code>,
and then writes that <code>int</code> value to the bytes message stream as a 4-byte quantity, high byte first.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>float</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeDouble-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeDouble</h4>
<pre>void&nbsp;writeDouble(double&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Converts the <code>double</code> argument to a <code>long</code> using the <code>doubleToLongBits</code> method in class
<code>Double</code>, and then writes that <code>long</code> value to the bytes message stream as an 8-byte quantity, high byte
first.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>double</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeUTF-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeUTF</h4>
<pre>void&nbsp;writeUTF(java.lang.String&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a string to the bytes message stream using UTF-8 encoding in a machine-independent manner.
<p>
For more information on the UTF-8 format, see "File System Safe UCS Transformation Format (FSS_UTF)", X/Open
Preliminary Specification, X/Open Company Ltd., Document Number: P316. This information also appears in ISO/IEC
10646, Annex P.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>String</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeBytes-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre>void&nbsp;writeBytes(byte[]&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a byte array to the bytes message stream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the byte array to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeBytes-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre>void&nbsp;writeBytes(byte[]&nbsp;value,
int&nbsp;offset,
int&nbsp;length)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes a portion of a byte array to the bytes message stream.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the byte array value to be written</dd>
<dd><code>offset</code> - the initial offset within the byte array</dd>
<dd><code>length</code> - the number of bytes to use</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeObject</h4>
<pre>void&nbsp;writeObject(java.lang.Object&nbsp;value)
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Writes an object to the bytes message stream.
<p>
This method works only for the objectified primitive object types (<code>Integer</code>, <code>Double</code>,
<code>Long</code>&nbsp;...), <code>String</code> objects, and byte arrays.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the object in the Java programming language ("Java object") to be written; it must not be null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</a></code> - if the object is of an invalid type.</dd>
<dd><code><a href="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
<dd><code>java.lang.NullPointerException</code> - if the parameter <code>value</code> is null.</dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reset</h4>
<pre>void&nbsp;reset()
throws <a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></pre>
<div class="block">Puts the message body in read-only mode and repositions the stream of bytes to the beginning.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</a></code> - if the JMS provider fails to reset the message due to some internal error.</dd>
<dd><code><a href="../../javax/jms/MessageFormatException.html" title="class in javax.jms">MessageFormatException</a></code> - if the message has an invalid format.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../javax/jms/CompletionListener.html" title="interface in javax.jms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javax/jms/BytesMessage.html" target="_top">Frames</a></li>
<li><a href="BytesMessage.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>