bytesmessage.html

来自「j2ee的API 1.4版本,j2ee的帮助文档」· HTML 代码 · 共 1,243 行 · 第 1/4 页

HTML
1,243
字号
<A NAME="readChar()"><!-- --></A><H3>readChar</H3><PRE>public char <B>readChar</B>()              throws <A HREF="../../javax/jms/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="../../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="readInt()"><!-- --></A><H3>readInt</H3><PRE>public int <B>readInt</B>()            throws <A HREF="../../javax/jms/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="../../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="readLong()"><!-- --></A><H3>readLong</H3><PRE>public long <B>readLong</B>()              throws <A HREF="../../javax/jms/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="../../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="readFloat()"><!-- --></A><H3>readFloat</H3><PRE>public float <B>readFloat</B>()                throws <A HREF="../../javax/jms/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="../../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="readDouble()"><!-- --></A><H3>readDouble</H3><PRE>public double <B>readDouble</B>()                  throws <A HREF="../../javax/jms/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="../../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="readUTF()"><!-- --></A><H3>readUTF</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>readUTF</B>()               throws <A HREF="../../javax/jms/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="../../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="readBytes(byte[])"><!-- --></A><H3>readBytes</H3><PRE>public int <B>readBytes</B>(byte[]&nbsp;value)              throws <A HREF="../../javax/jms/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="../../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.</DL></DD></DL><HR><A NAME="readBytes(byte[], int)"><!-- --></A><H3>readBytes</H3><PRE>public int <B>readBytes</B>(byte[]&nbsp;value,                     int&nbsp;length)              throws <A HREF="../../javax/jms/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="../../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.</DL></DD></DL><HR><A NAME="writeBoolean(boolean)"><!-- --></A><H3>writeBoolean</H3><PRE>public void <B>writeBoolean</B>(boolean&nbsp;value)                  throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to write the message                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/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>public void <B>writeByte</B>(byte&nbsp;value)               throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to write the message                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only                                          mode.</DL></DD></DL><HR><A NAME="writeShort(short)"><!-- --></A><H3>writeShort</H3><PRE>public void <B>writeShort</B>(short&nbsp;value)                throws <A HREF="../../javax/jms/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="../../javax/jms/JMSException.html" title="class in javax.jms">JMSException</A></CODE> - if the JMS provider fails to write the message                         due to some internal error.<DD><CODE><A HREF="../../javax/jms/MessageNotWriteableException.html" title="class in javax.jms">MessageNotWriteableException</A></CODE> - if the message is in read-only                                          mode.</DL></DD></DL><HR>

⌨️ 快捷键说明

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