bytesmessage.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 983 行 · 第 1/4 页
HTML
983 行
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="readChar()"><!-- --></A><H3>
readChar</H3>
<PRE>
public char <B>readChar</B>()
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a Unicode character value 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 as a Unicode
character<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="readInt()"><!-- --></A><H3>
readInt</H3>
<PRE>
public int <B>readInt</B>()
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a signed 32-bit integer from the bytes message stream.<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">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="readLong()"><!-- --></A><H3>
readLong</H3>
<PRE>
public long <B>readLong</B>()
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a signed 64-bit integer from the bytes message stream.<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">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="readFloat()"><!-- --></A><H3>
readFloat</H3>
<PRE>
public float <B>readFloat</B>()
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a <code>float</code> from the bytes message stream.<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">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="readDouble()"><!-- --></A><H3>
readDouble</H3>
<PRE>
public double <B>readDouble</B>()
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Reads a <code>double</code> from the bytes message stream.<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">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="readUTF()"><!-- --></A><H3>
readUTF</H3>
<PRE>
public java.lang.String <B>readUTF</B>()
throws <A HREF="../../javax/jms/JMSException.html">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.<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">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="readBytes(byte[])"><!-- --></A><H3>
readBytes</H3>
<PRE>
public int <B>readBytes</B>(byte[] value)
throws <A HREF="../../javax/jms/JMSException.html">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.<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">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">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[] value,
int length)
throws <A HREF="../../javax/jms/JMSException.html">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.<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">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">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 value)
throws <A HREF="../../javax/jms/JMSException.html">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>.<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">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">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 value)
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Writes a <code>byte</code> to the bytes message stream as a 1-byte
value.<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">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">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 value)
throws <A HREF="../../javax/jms/JMSException.html">JMSException</A></PRE>
<DL>
<DD>Writes a <code>short</code> to the bytes message stream as two bytes,
high byte first.<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">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">MessageNotWriteableException</A></CODE> - if the message is in read-only
mode.</DL>
</DD>
</DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?