blob: 0d553b8c83a3bfc1031259be6b54cbeabe841bd1 [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>StreamMessage</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="StreamMessage";
}
}
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};
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><a href="../../jakarta/jms/Session.html" title="interface in jakarta.jms"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../jakarta/jms/TemporaryQueue.html" title="interface in jakarta.jms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?jakarta/jms/StreamMessage.html" target="_top">Frames</a></li>
<li><a href="StreamMessage.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">jakarta.jms</div>
<h2 title="Interface StreamMessage" class="title">Interface StreamMessage</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../jakarta/jms/Message.html" title="interface in jakarta.jms">Message</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">StreamMessage</span>
extends <a href="../../jakarta/jms/Message.html" title="interface in jakarta.jms">Message</a></pre>
<div class="block">A <code>StreamMessage</code> object is used to send a stream of primitive types in the Java programming language. It is
filled and read sequentially. It inherits from the <code>Message</code> interface and adds a stream message body. Its
methods are based largely on those found in <code>java.io.DataInputStream</code> and <code>java.io.DataOutputStream</code>.
<p>
The primitive types can be read or written explicitly using methods for each type. They may also be read or written
generically as objects. For instance, a call to <code>StreamMessage.writeInt(6)</code> is equivalent to
<code>StreamMessage.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. 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 body 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.
<p>
<code>StreamMessage</code> objects support the following conversion table. The marked cases must be supported. The
unmarked cases must throw a <code>JMSException</code>. The <code>String</code>-to-primitive conversions may throw a runtime
exception if the primitive's <code>valueOf()</code> method does not accept it as a valid <code>String</code> representation of
the primitive.
<p>
A value written as the row type can be read as the column type.
<pre>
| | boolean byte short char int long float double String byte[]
|----------------------------------------------------------------------
|boolean | X X
|byte | X X X X X
|short | X X X X
|char | X X
|int | X X X
|long | X X
|float | X X X
|double | X X
|String | X X X X X X X X
|byte[] | X
|----------------------------------------------------------------------
</pre>
<p>
Attempting to read a null value as a primitive type must be treated as calling the primitive's corresponding
<code>valueOf(String)</code> conversion method with a null value. Since <code>char</code> does not support a <code>String</code>
conversion, attempting to read a null value as a <code>char</code> must throw a <code>NullPointerException</code>.</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="../../jakarta/jms/Session.html#createStreamMessage--"><code>Session.createStreamMessage()</code></a>,
<a href="../../jakarta/jms/BytesMessage.html" title="interface in jakarta.jms"><code>BytesMessage</code></a>,
<a href="../../jakarta/jms/MapMessage.html" title="interface in jakarta.jms"><code>MapMessage</code></a>,
<a href="../../jakarta/jms/Message.html" title="interface in jakarta.jms"><code>Message</code></a>,
<a href="../../jakarta/jms/ObjectMessage.html" title="interface in jakarta.jms"><code>ObjectMessage</code></a>,
<a href="../../jakarta/jms/TextMessage.html" title="interface in jakarta.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.jakarta.jms.Message">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;jakarta.jms.<a href="../../jakarta/jms/Message.html" title="interface in jakarta.jms">Message</a></h3>
<code><a href="../../jakarta/jms/Message.html#DEFAULT_DELIVERY_DELAY">DEFAULT_DELIVERY_DELAY</a>, <a href="../../jakarta/jms/Message.html#DEFAULT_DELIVERY_MODE">DEFAULT_DELIVERY_MODE</a>, <a href="../../jakarta/jms/Message.html#DEFAULT_PRIORITY">DEFAULT_PRIORITY</a>, <a href="../../jakarta/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>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readBoolean--">readBoolean</a></span>()</code>
<div class="block">Reads a <code>boolean</code> from the stream message.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readByte--">readByte</a></span>()</code>
<div class="block">Reads a <code>byte</code> value from the stream message.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readBytes-byte:A-">readBytes</a></span>(byte[]&nbsp;value)</code>
<div class="block">Reads a byte array field from the stream message into the specified <code>byte[]</code> object (the read buffer).</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readChar--">readChar</a></span>()</code>
<div class="block">Reads a Unicode character value from the stream message.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readDouble--">readDouble</a></span>()</code>
<div class="block">Reads a <code>double</code> from the stream message.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readFloat--">readFloat</a></span>()</code>
<div class="block">Reads a <code>float</code> from the stream message.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readInt--">readInt</a></span>()</code>
<div class="block">Reads a 32-bit integer from the stream message.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readLong--">readLong</a></span>()</code>
<div class="block">Reads a 64-bit integer from the stream message.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readObject--">readObject</a></span>()</code>
<div class="block">Reads an object from the stream message.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readShort--">readShort</a></span>()</code>
<div class="block">Reads a 16-bit integer from the stream message.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#readString--">readString</a></span>()</code>
<div class="block">Reads a <code>String</code> from the stream message.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#reset--">reset</a></span>()</code>
<div class="block">Puts the message body in read-only mode and repositions the stream to the beginning.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeBoolean-boolean-">writeBoolean</a></span>(boolean&nbsp;value)</code>
<div class="block">Writes a <code>boolean</code> to the stream message.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeByte-byte-">writeByte</a></span>(byte&nbsp;value)</code>
<div class="block">Writes a <code>byte</code> to the stream message.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeBytes-byte:A-">writeBytes</a></span>(byte[]&nbsp;value)</code>
<div class="block">Writes a byte array field to the stream message.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.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 as a byte array field to the stream message.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeChar-char-">writeChar</a></span>(char&nbsp;value)</code>
<div class="block">Writes a <code>char</code> to the stream message.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeDouble-double-">writeDouble</a></span>(double&nbsp;value)</code>
<div class="block">Writes a <code>double</code> to the stream message.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeFloat-float-">writeFloat</a></span>(float&nbsp;value)</code>
<div class="block">Writes a <code>float</code> to the stream message.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeInt-int-">writeInt</a></span>(int&nbsp;value)</code>
<div class="block">Writes an <code>int</code> to the stream message.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeLong-long-">writeLong</a></span>(long&nbsp;value)</code>
<div class="block">Writes a <code>long</code> to the stream message.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeObject-java.lang.Object-">writeObject</a></span>(java.lang.Object&nbsp;value)</code>
<div class="block">Writes an object to the stream message.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeShort-short-">writeShort</a></span>(short&nbsp;value)</code>
<div class="block">Writes a <code>short</code> to the stream message.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/jms/StreamMessage.html#writeString-java.lang.String-">writeString</a></span>(java.lang.String&nbsp;value)</code>
<div class="block">Writes a <code>String</code> to the stream message.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.jakarta.jms.Message">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;jakarta.jms.<a href="../../jakarta/jms/Message.html" title="interface in jakarta.jms">Message</a></h3>
<code><a href="../../jakarta/jms/Message.html#acknowledge--">acknowledge</a>, <a href="../../jakarta/jms/Message.html#clearBody--">clearBody</a>, <a href="../../jakarta/jms/Message.html#clearProperties--">clearProperties</a>, <a href="../../jakarta/jms/Message.html#getBody-java.lang.Class-">getBody</a>, <a href="../../jakarta/jms/Message.html#getBooleanProperty-java.lang.String-">getBooleanProperty</a>, <a href="../../jakarta/jms/Message.html#getByteProperty-java.lang.String-">getByteProperty</a>, <a href="../../jakarta/jms/Message.html#getDoubleProperty-java.lang.String-">getDoubleProperty</a>, <a href="../../jakarta/jms/Message.html#getFloatProperty-java.lang.String-">getFloatProperty</a>, <a href="../../jakarta/jms/Message.html#getIntProperty-java.lang.String-">getIntProperty</a>, <a href="../../jakarta/jms/Message.html#getJMSCorrelationID--">getJMSCorrelationID</a>, <a href="../../jakarta/jms/Message.html#getJMSCorrelationIDAsBytes--">getJMSCorrelationIDAsBytes</a>, <a href="../../jakarta/jms/Message.html#getJMSDeliveryMode--">getJMSDeliveryMode</a>, <a href="../../jakarta/jms/Message.html#getJMSDeliveryTime--">getJMSDeliveryTime</a>, <a href="../../jakarta/jms/Message.html#getJMSDestination--">getJMSDestination</a>, <a href="../../jakarta/jms/Message.html#getJMSExpiration--">getJMSExpiration</a>, <a href="../../jakarta/jms/Message.html#getJMSMessageID--">getJMSMessageID</a>, <a href="../../jakarta/jms/Message.html#getJMSPriority--">getJMSPriority</a>, <a href="../../jakarta/jms/Message.html#getJMSRedelivered--">getJMSRedelivered</a>, <a href="../../jakarta/jms/Message.html#getJMSReplyTo--">getJMSReplyTo</a>, <a href="../../jakarta/jms/Message.html#getJMSTimestamp--">getJMSTimestamp</a>, <a href="../../jakarta/jms/Message.html#getJMSType--">getJMSType</a>, <a href="../../jakarta/jms/Message.html#getLongProperty-java.lang.String-">getLongProperty</a>, <a href="../../jakarta/jms/Message.html#getObjectProperty-java.lang.String-">getObjectProperty</a>, <a href="../../jakarta/jms/Message.html#getPropertyNames--">getPropertyNames</a>, <a href="../../jakarta/jms/Message.html#getShortProperty-java.lang.String-">getShortProperty</a>, <a href="../../jakarta/jms/Message.html#getStringProperty-java.lang.String-">getStringProperty</a>, <a href="../../jakarta/jms/Message.html#isBodyAssignableTo-java.lang.Class-">isBodyAssignableTo</a>, <a href="../../jakarta/jms/Message.html#propertyExists-java.lang.String-">propertyExists</a>, <a href="../../jakarta/jms/Message.html#setBooleanProperty-java.lang.String-boolean-">setBooleanProperty</a>, <a href="../../jakarta/jms/Message.html#setByteProperty-java.lang.String-byte-">setByteProperty</a>, <a href="../../jakarta/jms/Message.html#setDoubleProperty-java.lang.String-double-">setDoubleProperty</a>, <a href="../../jakarta/jms/Message.html#setFloatProperty-java.lang.String-float-">setFloatProperty</a>, <a href="../../jakarta/jms/Message.html#setIntProperty-java.lang.String-int-">setIntProperty</a>, <a href="../../jakarta/jms/Message.html#setJMSCorrelationID-java.lang.String-">setJMSCorrelationID</a>, <a href="../../jakarta/jms/Message.html#setJMSCorrelationIDAsBytes-byte:A-">setJMSCorrelationIDAsBytes</a>, <a href="../../jakarta/jms/Message.html#setJMSDeliveryMode-int-">setJMSDeliveryMode</a>, <a href="../../jakarta/jms/Message.html#setJMSDeliveryTime-long-">setJMSDeliveryTime</a>, <a href="../../jakarta/jms/Message.html#setJMSDestination-jakarta.jms.Destination-">setJMSDestination</a>, <a href="../../jakarta/jms/Message.html#setJMSExpiration-long-">setJMSExpiration</a>, <a href="../../jakarta/jms/Message.html#setJMSMessageID-java.lang.String-">setJMSMessageID</a>, <a href="../../jakarta/jms/Message.html#setJMSPriority-int-">setJMSPriority</a>, <a href="../../jakarta/jms/Message.html#setJMSRedelivered-boolean-">setJMSRedelivered</a>, <a href="../../jakarta/jms/Message.html#setJMSReplyTo-jakarta.jms.Destination-">setJMSReplyTo</a>, <a href="../../jakarta/jms/Message.html#setJMSTimestamp-long-">setJMSTimestamp</a>, <a href="../../jakarta/jms/Message.html#setJMSType-java.lang.String-">setJMSType</a>, <a href="../../jakarta/jms/Message.html#setLongProperty-java.lang.String-long-">setLongProperty</a>, <a href="../../jakarta/jms/Message.html#setObjectProperty-java.lang.String-java.lang.Object-">setObjectProperty</a>, <a href="../../jakarta/jms/Message.html#setShortProperty-java.lang.String-short-">setShortProperty</a>, <a href="../../jakarta/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="readBoolean--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBoolean</h4>
<pre>boolean&nbsp;readBoolean()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a <code>boolean</code> from the stream message.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a <code>byte</code> value from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next byte from the stream message as a 8-bit <code>byte</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a 16-bit integer from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a 16-bit integer from the stream message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a Unicode character value from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Unicode character from the stream message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a 32-bit integer from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a 32-bit integer value from the stream message, interpreted as an <code>int</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a 64-bit integer from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a 64-bit integer value from the stream message, interpreted as a <code>long</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a <code>float</code> from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>float</code> value from the stream message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a <code>double</code> from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>double</code> value from the stream message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
</dl>
</li>
</ul>
<a name="readString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readString</h4>
<pre>java.lang.String&nbsp;readString()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a <code>String</code> from the stream message.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Unicode string from the stream message</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads a byte array field from the stream message into the specified <code>byte[]</code> object (the read buffer).
<p>
To read the field value, <code>readBytes</code> 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.
<p>
If <code>readBytes</code> returns a value equal to the length of the buffer, a subsequent <code>readBytes</code> call must be
made. If there are no more bytes to be read, this call returns -1.
<p>
If the byte array field value is null, <code>readBytes</code> returns -1.
<p>
If the byte array field value is empty, <code>readBytes</code> returns 0.
<p>
Once the first <code>readBytes</code> call on a <code>byte[]</code> 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 <code>MessageFormatException</code>.
<p>
To read the byte field value into a new <code>byte[]</code> object, use the <code>readObject</code> method.</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 byte
field has been reached</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/StreamMessage.html#readObject--"><code>readObject()</code></a></dd>
</dl>
</li>
</ul>
<a name="readObject--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readObject</h4>
<pre>java.lang.Object&nbsp;readObject()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Reads an object from the stream message.
<p>
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 <code>writeObject</code> method call, or its equivalent primitive
<code>write<I>type</I></code> method.
<p>
Note that byte values are returned as <code>byte[]</code>, not <code>Byte[]</code>.
<p>
An attempt to call <code>readObject</code> to read a byte field value into a new <code>byte[]</code> object before the full
value of the byte field has been read will throw a <code>MessageFormatException</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Java object from the stream message, in objectified format (for example, if the object was written as an
<code>int</code>, an <code>Integer</code> is returned)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to read the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageEOFException.html" title="class in jakarta.jms">MessageEOFException</a></code> - if unexpected end of message stream has been reached.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if this type conversion is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotReadableException.html" title="class in jakarta.jms">MessageNotReadableException</a></code> - if the message is in write-only mode.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../jakarta/jms/StreamMessage.html#readBytes-byte:A-"><code>readBytes(byte[] value)</code></a></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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>boolean</code> to the stream message. 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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>byte</code> to the stream message.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>short</code> to the stream message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>short</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>char</code> to the stream message.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes an <code>int</code> to the stream message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>int</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>long</code> to the stream message.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the <code>long</code> value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>float</code> to the stream message.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>double</code> to the stream message.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="writeString-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeString</h4>
<pre>void&nbsp;writeString(java.lang.String&nbsp;value)
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a <code>String</code> to the stream message.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a byte array field to the stream message.
<p>
The byte array <code>value</code> 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.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the byte array value to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes a portion of a byte array as a byte array field to the stream message.
<p>
The a portion of the byte array <code>value</code> 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.</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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.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="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Writes an object to the stream message.
<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 Java object to be written</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to write the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.jms">MessageFormatException</a></code> - if the object is invalid.</dd>
<dd><code><a href="../../jakarta/jms/MessageNotWriteableException.html" title="class in jakarta.jms">MessageNotWriteableException</a></code> - if the message is in read-only mode.</dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reset</h4>
<pre>void&nbsp;reset()
throws <a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></pre>
<div class="block">Puts the message body in read-only mode and repositions the stream to the beginning.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/jms/JMSException.html" title="class in jakarta.jms">JMSException</a></code> - if the Jakarta Messaging provider fails to reset the message due to some internal error.</dd>
<dd><code><a href="../../jakarta/jms/MessageFormatException.html" title="class in jakarta.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><a href="../../jakarta/jms/Session.html" title="interface in jakarta.jms"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../jakarta/jms/TemporaryQueue.html" title="interface in jakarta.jms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?jakarta/jms/StreamMessage.html" target="_top">Frames</a></li>
<li><a href="StreamMessage.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>