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

📄 streammessage.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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.4.2_02) on Thu Nov 13 17:20:39 PST 2003 --><TITLE>StreamMessage (Java 2 Platform Ent. Ed. v1.4)</TITLE><META NAME="keywords" CONTENT="javax.jms.StreamMessage interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="StreamMessage (Java 2 Platform Ent. Ed. v1.4)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 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="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/jms/Session.html" title="interface in javax.jms"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/jms/TemporaryQueue.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" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="StreamMessage.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="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#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 StreamMessage</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A></DD></DL><HR><DL><DT>public interface <B>StreamMessage</B><DT>extends <A HREF="../../javax/jms/Message.html" title="interface in javax.jms">Message</A></DL><P>A <CODE>StreamMessage</CODE> object is used to send a stream of primitive types in the Java programming language. It is filled and read sequentially. It inherits from the <CODE>Message</CODE> interface and adds a stream message body. Its methods are based largely on those found in <CODE>java.io.DataInputStream</CODE> and <CODE>java.io.DataOutputStream</CODE>. <P>The primitive types can be read or written explicitly using methods for each type. They may also be read or written generically as objects. For instance, a call to <CODE>StreamMessage.writeInt(6)</CODE> is equivalent to <CODE>StreamMessage.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 body 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><CODE>StreamMessage</CODE> objects support the following conversion  table. The marked cases must be supported. The unmarked cases must throw a  <CODE>JMSException</CODE>. The <CODE>String</CODE>-to-primitive conversions  may throw a runtime exception if the primitive's <CODE>valueOf()</CODE>  method does not accept it as a valid <CODE>String</CODE> representation of  the primitive. <P>A value written as the row type can be read as the column type. <PRE> |        | boolean byte short char int long float double String byte[] |---------------------------------------------------------------------- |boolean |    X                                            X |byte    |          X     X         X   X                  X    |short   |                X         X   X                  X    |char    |                     X                           X |int     |                          X   X                  X    |long    |                              X                  X    |float   |                                    X     X      X    |double  |                                          X      X    |String  |    X     X     X         X   X     X     X      X    |byte[]  |                                                        X |---------------------------------------------------------------------- </PRE> <P>Attempting to read a null value as a primitive type must be treated as calling the primitive's corresponding <code>valueOf(String)</code>  conversion method with a null value. Since <code>char</code> does not  support a <code>String</code> conversion, attempting to read a null value  as a <code>char</code> must throw a <code>NullPointerException</code>.<P><P><DL><DT><B>Version:</B></DT>  <DD>1.0 - 6 August 1998</DD><DT><B>Author:</B></DT>  <DD>Mark Hapner, Rich Burridge</DD><DT><B>See Also:</B><DD><A HREF="../../javax/jms/Session.html#createStreamMessage()"><CODE>Session.createStreamMessage()</CODE></A>, <A HREF="../../javax/jms/BytesMessage.html" title="interface in javax.jms"><CODE>BytesMessage</CODE></A>, <A HREF="../../javax/jms/MapMessage.html" title="interface in javax.jms"><CODE>MapMessage</CODE></A>, <A HREF="../../javax/jms/Message.html" title="interface in javax.jms"><CODE>Message</CODE></A>, <A HREF="../../javax/jms/ObjectMessage.html" title="interface in javax.jms"><CODE>ObjectMessage</CODE></A>, <A HREF="../../javax/jms/TextMessage.html" title="interface in javax.jms"><CODE>TextMessage</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></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"><TD><B>Fields 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#DEFAULT_DELIVERY_MODE">DEFAULT_DELIVERY_MODE</A>, <A HREF="../../javax/jms/Message.html#DEFAULT_PRIORITY">DEFAULT_PRIORITY</A>, <A HREF="../../javax/jms/Message.html#DEFAULT_TIME_TO_LIVE">DEFAULT_TIME_TO_LIVE</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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="../../javax/jms/StreamMessage.html#readBoolean()">readBoolean</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>boolean</code> from the stream message.</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="../../javax/jms/StreamMessage.html#readByte()">readByte</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>byte</code> value from the stream message.</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="../../javax/jms/StreamMessage.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 field from the stream message into the  specified <CODE>byte[]</CODE> object (the read buffer).   </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="../../javax/jms/StreamMessage.html#readChar()">readChar</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a Unicode character value from the stream message.</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="../../javax/jms/StreamMessage.html#readDouble()">readDouble</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>double</code> from the stream message.</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="../../javax/jms/StreamMessage.html#readFloat()">readFloat</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a <code>float</code> from the stream message.</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="../../javax/jms/StreamMessage.html#readInt()">readInt</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a 32-bit integer from the stream message.</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="../../javax/jms/StreamMessage.html#readLong()">readLong</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a 64-bit integer from the stream message.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/jms/StreamMessage.html#readObject()">readObject</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an object from the stream message. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

⌨️ 快捷键说明

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