Files
123123/doc-10.0.10/Docs2017/api/mgmt_api/javax/jms/BytesMessage.html
T
GizzlerandCursor 58b7826162 Add live TLS certificate probing and improve restart error handling.
Configure CertificateCheckUrl per container for curl-like TLS checks, classify Sonic permission errors, and extend setup wizard for container management.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 13:16:21 +02:00

1221 lines
52 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_19) on Fri Aug 12 11:25:11 EDT 2011 -->
<TITLE>
BytesMessage (Management Application API)
</TITLE>
<META NAME="keywords" CONTENT="javax.jms.BytesMessage interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="BytesMessage (Management Application API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="BytesMessage.html#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Sonic Management API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="Connection.html" title="interface in javax.jms"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html@javax%252Fjms%252FBytesMessage.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="BytesMessage.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="BytesMessage.html#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="BytesMessage.html#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.jms</FONT>
<BR>
Interface BytesMessage</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="Message.html" title="interface in javax.jms">Message</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>BytesMessage</B><DT>extends <A HREF="Message.html" title="interface in javax.jms">Message</A></DL>
</PRE>
<P>
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.
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.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="Session.html#createBytesMessage()"><CODE>Session.createBytesMessage()</CODE></A>,
<A HREF="MapMessage.html" title="interface in javax.jms"><CODE>MapMessage</CODE></A>,
<A HREF="Message.html" title="interface in javax.jms"><CODE>Message</CODE></A>,
<A HREF="ObjectMessage.html" title="interface in javax.jms"><CODE>ObjectMessage</CODE></A>,
<A HREF="StreamMessage.html" title="interface in javax.jms"><CODE>StreamMessage</CODE></A>,
<A HREF="TextMessage.html" title="interface in javax.jms"><CODE>TextMessage</CODE></A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_javax.jms.Message"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from interface javax.jms.<A HREF="Message.html" title="interface in javax.jms">Message</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="Message.html#DEFAULT_DELIVERY_MODE">DEFAULT_DELIVERY_MODE</A>, <A HREF="Message.html#DEFAULT_PRIORITY">DEFAULT_PRIORITY</A>, <A HREF="Message.html#DEFAULT_TIME_TO_LIVE">DEFAULT_TIME_TO_LIVE</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#getBodyLength()">getBodyLength</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of bytes of the message body when the message
is in read-only mode.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readBoolean()">readBoolean</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>boolean</code> from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readByte()">readByte</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a signed 8-bit value from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readBytes(byte[])">readBytes</A></B>(byte[]&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a byte array from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readBytes(byte[], int)">readBytes</A></B>(byte[]&nbsp;value,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a portion of the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readChar()">readChar</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a Unicode character value from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readDouble()">readDouble</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>double</code> from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readFloat()">readFloat</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>float</code> from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readInt()">readInt</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a signed 32-bit integer from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readLong()">readLong</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a signed 64-bit integer from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;short</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readShort()">readShort</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a signed 16-bit number from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readUnsignedByte()">readUnsignedByte</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an unsigned 8-bit number from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readUnsignedShort()">readUnsignedShort</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an unsigned 16-bit number from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#readUTF()">readUTF</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a string that has been encoded using a modified UTF-8
format from the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#reset()">reset</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts the message body in read-only mode and repositions the stream of
bytes to the beginning.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeBoolean(boolean)">writeBoolean</A></B>(boolean&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a <code>boolean</code> to the bytes message stream as a 1-byte
value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeByte(byte)">writeByte</A></B>(byte&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a <code>byte</code> to the bytes message stream as a 1-byte
value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeBytes(byte[])">writeBytes</A></B>(byte[]&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a byte array to the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeBytes(byte[], int, int)">writeBytes</A></B>(byte[]&nbsp;value,
int&nbsp;offset,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a portion of a byte array to the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeChar(char)">writeChar</A></B>(char&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a <code>char</code> to the bytes message stream as a 2-byte
value, high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeDouble(double)">writeDouble</A></B>(double&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeFloat(float)">writeFloat</A></B>(float&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeInt(int)">writeInt</A></B>(int&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an <code>int</code> to the bytes message stream as four bytes,
high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeLong(long)">writeLong</A></B>(long&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a <code>long</code> to the bytes message stream as eight bytes,
high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeObject(java.lang.Object)">writeObject</A></B>(java.lang.Object&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an object to the bytes message stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeShort(short)">writeShort</A></B>(short&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a <code>short</code> to the bytes message stream as two bytes,
high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="BytesMessage.html#writeUTF(java.lang.String)">writeUTF</A></B>(java.lang.String&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a string to the bytes message stream using UTF-8 encoding in a
machine-independent manner.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.jms.Message"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface javax.jms.<A HREF="Message.html" title="interface in javax.jms">Message</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="Message.html#acknowledge()">acknowledge</A>, <A HREF="Message.html#clearBody()">clearBody</A>, <A HREF="Message.html#clearProperties()">clearProperties</A>, <A HREF="Message.html#getBooleanProperty(java.lang.String)">getBooleanProperty</A>, <A HREF="Message.html#getByteProperty(java.lang.String)">getByteProperty</A>, <A HREF="Message.html#getDoubleProperty(java.lang.String)">getDoubleProperty</A>, <A HREF="Message.html#getFloatProperty(java.lang.String)">getFloatProperty</A>, <A HREF="Message.html#getIntProperty(java.lang.String)">getIntProperty</A>, <A HREF="Message.html#getJMSCorrelationID()">getJMSCorrelationID</A>, <A HREF="Message.html#getJMSCorrelationIDAsBytes()">getJMSCorrelationIDAsBytes</A>, <A HREF="Message.html#getJMSDeliveryMode()">getJMSDeliveryMode</A>, <A HREF="Message.html#getJMSDestination()">getJMSDestination</A>, <A HREF="Message.html#getJMSExpiration()">getJMSExpiration</A>, <A HREF="Message.html#getJMSMessageID()">getJMSMessageID</A>, <A HREF="Message.html#getJMSPriority()">getJMSPriority</A>, <A HREF="Message.html#getJMSRedelivered()">getJMSRedelivered</A>, <A HREF="Message.html#getJMSReplyTo()">getJMSReplyTo</A>, <A HREF="Message.html#getJMSTimestamp()">getJMSTimestamp</A>, <A HREF="Message.html#getJMSType()">getJMSType</A>, <A HREF="Message.html#getLongProperty(java.lang.String)">getLongProperty</A>, <A HREF="Message.html#getObjectProperty(java.lang.String)">getObjectProperty</A>, <A HREF="Message.html#getPropertyNames()">getPropertyNames</A>, <A HREF="Message.html#getShortProperty(java.lang.String)">getShortProperty</A>, <A HREF="Message.html#getStringProperty(java.lang.String)">getStringProperty</A>, <A HREF="Message.html#propertyExists(java.lang.String)">propertyExists</A>, <A HREF="Message.html#setBooleanProperty(java.lang.String, boolean)">setBooleanProperty</A>, <A HREF="Message.html#setByteProperty(java.lang.String, byte)">setByteProperty</A>, <A HREF="Message.html#setDoubleProperty(java.lang.String, double)">setDoubleProperty</A>, <A HREF="Message.html#setFloatProperty(java.lang.String, float)">setFloatProperty</A>, <A HREF="Message.html#setIntProperty(java.lang.String, int)">setIntProperty</A>, <A HREF="Message.html#setJMSCorrelationID(java.lang.String)">setJMSCorrelationID</A>, <A HREF="Message.html#setJMSCorrelationIDAsBytes(byte[])">setJMSCorrelationIDAsBytes</A>, <A HREF="Message.html#setJMSDeliveryMode(int)">setJMSDeliveryMode</A>, <A HREF="Message.html#setJMSDestination(javax.jms.Destination)">setJMSDestination</A>, <A HREF="Message.html#setJMSExpiration(long)">setJMSExpiration</A>, <A HREF="Message.html#setJMSMessageID(java.lang.String)">setJMSMessageID</A>, <A HREF="Message.html#setJMSPriority(int)">setJMSPriority</A>, <A HREF="Message.html#setJMSRedelivered(boolean)">setJMSRedelivered</A>, <A HREF="Message.html#setJMSReplyTo(javax.jms.Destination)">setJMSReplyTo</A>, <A HREF="Message.html#setJMSTimestamp(long)">setJMSTimestamp</A>, <A HREF="Message.html#setJMSType(java.lang.String)">setJMSType</A>, <A HREF="Message.html#setLongProperty(java.lang.String, long)">setLongProperty</A>, <A HREF="Message.html#setObjectProperty(java.lang.String, java.lang.Object)">setObjectProperty</A>, <A HREF="Message.html#setShortProperty(java.lang.String, short)">setShortProperty</A>, <A HREF="Message.html#setStringProperty(java.lang.String, java.lang.String)">setStringProperty</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getBodyLength()"><!-- --></A><H3>
getBodyLength</H3>
<PRE>
long <B>getBodyLength</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>number of bytes in the message
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="readBoolean()"><!-- --></A><H3>
readBoolean</H3>
<PRE>
boolean <B>readBoolean</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a <code>boolean</code> from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>boolean</code> value read
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readByte()"><!-- --></A><H3>
readByte</H3>
<PRE>
byte <B>readByte</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a signed 8-bit value from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next byte from the bytes message stream as a signed 8-bit
<code>byte</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readBytes(byte[])"><!-- --></A><H3>
readBytes</H3>
<PRE>
int <B>readBytes</B>(byte[]&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the buffer into which the data is read
<DT><B>Returns:</B><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
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readBytes(byte[], int)"><!-- --></A><H3>
readBytes</H3>
<PRE>
int <B>readBytes</B>(byte[]&nbsp;value,
int&nbsp;length)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the buffer into which the data is read<DD><CODE>length</CODE> - the number of bytes to read; must be less than or equal to
<code>value.length</code>
<DT><B>Returns:</B><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
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readChar()"><!-- --></A><H3>
readChar</H3>
<PRE>
char <B>readChar</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a Unicode character value from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next two bytes from the bytes message stream as a Unicode
character
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readDouble()"><!-- --></A><H3>
readDouble</H3>
<PRE>
double <B>readDouble</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a <code>double</code> from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next eight bytes from the bytes message stream, interpreted
as a <code>double</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readFloat()"><!-- --></A><H3>
readFloat</H3>
<PRE>
float <B>readFloat</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a <code>float</code> from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next four bytes from the bytes message stream, interpreted
as a <code>float</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readInt()"><!-- --></A><H3>
readInt</H3>
<PRE>
int <B>readInt</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a signed 32-bit integer from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next four bytes from the bytes message stream, interpreted
as an <code>int</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readLong()"><!-- --></A><H3>
readLong</H3>
<PRE>
long <B>readLong</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a signed 64-bit integer from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next eight bytes from the bytes message stream, interpreted
as a <code>long</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readShort()"><!-- --></A><H3>
readShort</H3>
<PRE>
short <B>readShort</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads a signed 16-bit number from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next two bytes from the bytes message stream, interpreted as
a signed 16-bit number
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readUnsignedByte()"><!-- --></A><H3>
readUnsignedByte</H3>
<PRE>
int <B>readUnsignedByte</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads an unsigned 8-bit number from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next byte from the bytes message stream, interpreted as an
unsigned 8-bit number
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readUnsignedShort()"><!-- --></A><H3>
readUnsignedShort</H3>
<PRE>
int <B>readUnsignedShort</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Reads an unsigned 16-bit number from the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next two bytes from the bytes message stream, interpreted as
an unsigned 16-bit integer
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="readUTF()"><!-- --></A><H3>
readUTF</H3>
<PRE>
java.lang.String <B>readUTF</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a Unicode string from the bytes message stream
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has
been reached.
<DD><CODE><A HREF="MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
void <B>reset</B>()
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Puts the message body in read-only mode and repositions the stream of
bytes to the beginning.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageFormatException.html" title="class in javax.jms">MessageFormatException</A></CODE> - if the message has an invalid
format.</DL>
</DD>
</DL>
<HR>
<A NAME="writeBoolean(boolean)"><!-- --></A><H3>
writeBoolean</H3>
<PRE>
void <B>writeBoolean</B>(boolean&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>boolean</code> value to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeByte(byte)"><!-- --></A><H3>
writeByte</H3>
<PRE>
void <B>writeByte</B>(byte&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes a <code>byte</code> to the bytes message stream as a 1-byte
value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>byte</code> value to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeBytes(byte[])"><!-- --></A><H3>
writeBytes</H3>
<PRE>
void <B>writeBytes</B>(byte[]&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes a byte array to the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the byte array to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeBytes(byte[], int, int)"><!-- --></A><H3>
writeBytes</H3>
<PRE>
void <B>writeBytes</B>(byte[]&nbsp;value,
int&nbsp;offset,
int&nbsp;length)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes a portion of a byte array to the bytes message stream.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the byte array value to be written<DD><CODE>offset</CODE> - the initial offset within the byte array<DD><CODE>length</CODE> - the number of bytes to use
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeChar(char)"><!-- --></A><H3>
writeChar</H3>
<PRE>
void <B>writeChar</B>(char&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes a <code>char</code> to the bytes message stream as a 2-byte
value, high byte first.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>char</code> value to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeDouble(double)"><!-- --></A><H3>
writeDouble</H3>
<PRE>
void <B>writeDouble</B>(double&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>double</code> value to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeFloat(float)"><!-- --></A><H3>
writeFloat</H3>
<PRE>
void <B>writeFloat</B>(float&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>float</code> value to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeInt(int)"><!-- --></A><H3>
writeInt</H3>
<PRE>
void <B>writeInt</B>(int&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes an <code>int</code> to the bytes message stream as four bytes,
high byte first.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>int</code> to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeLong(long)"><!-- --></A><H3>
writeLong</H3>
<PRE>
void <B>writeLong</B>(long&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes a <code>long</code> to the bytes message stream as eight bytes,
high byte first.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>long</code> to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeObject(java.lang.Object)"><!-- --></A><H3>
writeObject</H3>
<PRE>
void <B>writeObject</B>(java.lang.Object&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the object in the Java programming language ("Java
object") to be written; it must not be null
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageFormatException.html" title="class in javax.jms">MessageFormatException</A></CODE> - if the object is of an invalid type.
<DD><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.
<DD><CODE>java.lang.NullPointerException</CODE> - if the parameter
<code>value</code> is null.</DL>
</DD>
</DL>
<HR>
<A NAME="writeShort(short)"><!-- --></A><H3>
writeShort</H3>
<PRE>
void <B>writeShort</B>(short&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>Writes a <code>short</code> to the bytes message stream as two bytes,
high byte first.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>short</code> to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<HR>
<A NAME="writeUTF(java.lang.String)"><!-- --></A><H3>
writeUTF</H3>
<PRE>
void <B>writeUTF</B>(java.lang.String&nbsp;value)
throws <A HREF="JMSException.html" title="class in javax.jms">JMSException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the <code>String</code> value to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="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><CODE><A HREF="MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="BytesMessage.html#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Sonic Management API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="Connection.html" title="interface in javax.jms"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html@javax%252Fjms%252FBytesMessage.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="BytesMessage.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="BytesMessage.html#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="BytesMessage.html#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<font size="-1">Copyright &copy; 2001-2011
<a href="http://www.progress.com" target="_top"> Progress Software Corporation</a>. All Rights Reserved.
<br>HTML formatted on 12-Aug-2011.</font>
</BODY>
</HTML>