bytesmessage.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 983 行 · 第 1/4 页

HTML
983
字号
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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="../../javax/jms/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" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.jms.<A HREF="../../javax/jms/Message.html">Message</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../javax/jms/Message.html#acknowledge()">acknowledge</A>, <A HREF="../../javax/jms/Message.html#clearBody()">clearBody</A>, <A HREF="../../javax/jms/Message.html#clearProperties()">clearProperties</A>, <A HREF="../../javax/jms/Message.html#getBooleanProperty(java.lang.String)">getBooleanProperty</A>, <A HREF="../../javax/jms/Message.html#getByteProperty(java.lang.String)">getByteProperty</A>, <A HREF="../../javax/jms/Message.html#getDoubleProperty(java.lang.String)">getDoubleProperty</A>, <A HREF="../../javax/jms/Message.html#getFloatProperty(java.lang.String)">getFloatProperty</A>, <A HREF="../../javax/jms/Message.html#getIntProperty(java.lang.String)">getIntProperty</A>, <A HREF="../../javax/jms/Message.html#getJMSCorrelationID()">getJMSCorrelationID</A>, <A HREF="../../javax/jms/Message.html#getJMSCorrelationIDAsBytes()">getJMSCorrelationIDAsBytes</A>, <A HREF="../../javax/jms/Message.html#getJMSDeliveryMode()">getJMSDeliveryMode</A>, <A HREF="../../javax/jms/Message.html#getJMSDestination()">getJMSDestination</A>, <A HREF="../../javax/jms/Message.html#getJMSExpiration()">getJMSExpiration</A>, <A HREF="../../javax/jms/Message.html#getJMSMessageID()">getJMSMessageID</A>, <A HREF="../../javax/jms/Message.html#getJMSPriority()">getJMSPriority</A>, <A HREF="../../javax/jms/Message.html#getJMSRedelivered()">getJMSRedelivered</A>, <A HREF="../../javax/jms/Message.html#getJMSReplyTo()">getJMSReplyTo</A>, <A HREF="../../javax/jms/Message.html#getJMSTimestamp()">getJMSTimestamp</A>, <A HREF="../../javax/jms/Message.html#getJMSType()">getJMSType</A>, <A HREF="../../javax/jms/Message.html#getLongProperty(java.lang.String)">getLongProperty</A>, <A HREF="../../javax/jms/Message.html#getObjectProperty(java.lang.String)">getObjectProperty</A>, <A HREF="../../javax/jms/Message.html#getPropertyNames()">getPropertyNames</A>, <A HREF="../../javax/jms/Message.html#getShortProperty(java.lang.String)">getShortProperty</A>, <A HREF="../../javax/jms/Message.html#getStringProperty(java.lang.String)">getStringProperty</A>, <A HREF="../../javax/jms/Message.html#propertyExists(java.lang.String)">propertyExists</A>, <A HREF="../../javax/jms/Message.html#setBooleanProperty(java.lang.String, boolean)">setBooleanProperty</A>, <A HREF="../../javax/jms/Message.html#setByteProperty(java.lang.String, byte)">setByteProperty</A>, <A HREF="../../javax/jms/Message.html#setDoubleProperty(java.lang.String, double)">setDoubleProperty</A>, <A HREF="../../javax/jms/Message.html#setFloatProperty(java.lang.String, float)">setFloatProperty</A>, <A HREF="../../javax/jms/Message.html#setIntProperty(java.lang.String, int)">setIntProperty</A>, <A HREF="../../javax/jms/Message.html#setJMSCorrelationID(java.lang.String)">setJMSCorrelationID</A>, <A HREF="../../javax/jms/Message.html#setJMSCorrelationIDAsBytes(byte[])">setJMSCorrelationIDAsBytes</A>, <A HREF="../../javax/jms/Message.html#setJMSDeliveryMode(int)">setJMSDeliveryMode</A>, <A HREF="../../javax/jms/Message.html#setJMSDestination(javax.jms.Destination)">setJMSDestination</A>, <A HREF="../../javax/jms/Message.html#setJMSExpiration(long)">setJMSExpiration</A>, <A HREF="../../javax/jms/Message.html#setJMSMessageID(java.lang.String)">setJMSMessageID</A>, <A HREF="../../javax/jms/Message.html#setJMSPriority(int)">setJMSPriority</A>, <A HREF="../../javax/jms/Message.html#setJMSRedelivered(boolean)">setJMSRedelivered</A>, <A HREF="../../javax/jms/Message.html#setJMSReplyTo(javax.jms.Destination)">setJMSReplyTo</A>, <A HREF="../../javax/jms/Message.html#setJMSTimestamp(long)">setJMSTimestamp</A>, <A HREF="../../javax/jms/Message.html#setJMSType(java.lang.String)">setJMSType</A>, <A HREF="../../javax/jms/Message.html#setLongProperty(java.lang.String, long)">setLongProperty</A>, <A HREF="../../javax/jms/Message.html#setObjectProperty(java.lang.String, java.lang.Object)">setObjectProperty</A>, <A HREF="../../javax/jms/Message.html#setShortProperty(java.lang.String, short)">setShortProperty</A>, <A HREF="../../javax/jms/Message.html#setStringProperty(java.lang.String, java.lang.String)">setStringProperty</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="readBoolean()"><!-- --></A><H3>
readBoolean</H3>
<PRE>
public boolean <B>readBoolean</B>()
                    throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a <code>boolean</code> from the bytes message stream.<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="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to read the message 
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html">MessageEOFException</A></CODE> - if unexpected end of bytes stream has 
                                been reached.<DD><CODE><A HREF="../../javax/jms/MessageNotReadableException.html">MessageNotReadableException</A></CODE> - if the message is in write-only 
                                        mode.</DL>
</DD>
</DL>
<HR>

<A NAME="readByte()"><!-- --></A><H3>
readByte</H3>
<PRE>
public byte <B>readByte</B>()
              throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a signed 8-bit value from the bytes message stream.<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="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to read the message 
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html">MessageEOFException</A></CODE> - if unexpected end of bytes stream has 
                                been reached.<DD><CODE><A HREF="../../javax/jms/MessageNotReadableException.html">MessageNotReadableException</A></CODE> - if the message is in write-only 
                                        mode.</DL>
</DD>
</DL>
<HR>

<A NAME="readUnsignedByte()"><!-- --></A><H3>
readUnsignedByte</H3>
<PRE>
public int <B>readUnsignedByte</B>()
                     throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads an unsigned 8-bit number from the bytes message stream.<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="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to read the message 
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html">MessageEOFException</A></CODE> - if unexpected end of bytes stream has 
                                been reached.<DD><CODE><A HREF="../../javax/jms/MessageNotReadableException.html">MessageNotReadableException</A></CODE> - if the message is in write-only 
                                        mode.</DL>
</DD>
</DL>
<HR>

<A NAME="readShort()"><!-- --></A><H3>
readShort</H3>
<PRE>
public short <B>readShort</B>()
                throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a signed 16-bit number from the bytes message stream.<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="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to read the message 
                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html">MessageEOFException</A></CODE> - if unexpected end of bytes stream has 
                                been reached.<DD><CODE><A HREF="../../javax/jms/MessageNotReadableException.html">MessageNotReadableException</A></CODE> - if the message is in write-only 
                                        mode.</DL>
</DD>
</DL>
<HR>

<A NAME="readUnsignedShort()"><!-- --></A><H3>
readUnsignedShort</H3>
<PRE>
public int <B>readUnsignedShort</B>()
                      throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads an unsigned 16-bit number from the bytes message stream.<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="../../javax/jms/JMSException.html">JMSException</A></CODE> - if the JMS provider fails to read the message 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?