⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bytesmessage.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<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>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&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>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&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"><TD><B>Methods inherited from interface javax.jms.<A HREF="../../javax/jms/Message.html" title="interface in javax.jms">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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getBodyLength()"><!-- --></A><H3>getBodyLength</H3><PRE>public long <B>getBodyLength</B>()                   throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to read the message                          due to some internal error.<DD><CODE><A HREF="../../javax/jms/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>public boolean <B>readBoolean</B>()                    throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to read the message                          due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has                                 been reached.<DD><CODE><A HREF="../../javax/jms/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>public byte <B>readByte</B>()              throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to read the message                          due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has                                 been reached.<DD><CODE><A HREF="../../javax/jms/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>public int <B>readUnsignedByte</B>()                     throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to read the message                          due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has                                 been reached.<DD><CODE><A HREF="../../javax/jms/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>public short <B>readShort</B>()                throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to read the message                          due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has                                 been reached.<DD><CODE><A HREF="../../javax/jms/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>public int <B>readUnsignedShort</B>()                      throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to read the message                          due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageEOFException.html" title="class in javax.jms">MessageEOFException</A></CODE> - if unexpected end of bytes stream has                                 been reached.<DD><CODE><A HREF="../../javax/jms/MessageNotReadableException.html" title="class in javax.jms">MessageNotReadableException</A></CODE> - if the message is in write-only                                         mode.</DL></DD></DL><HR>

⌨️ 快捷键说明

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