📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Sep 24 14:57:45 PDT 2003 -->
<TITLE>
MID Profile: Package javax.microedition.io
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>MID Profile</strong></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../java/util/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../javax/microedition/lcdui/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<H2>
Package javax.microedition.io
</H2>
MID Profile includes networking support based on the <code>Generic Connection</code> framework from the <em>Connected, Limited Device Configuration</em>.
<P>
<B>See: </B>
<BR>
<A HREF="#package_description"><B>Description</B></A>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Interface Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="CommConnection.html"><I>CommConnection</I></A></B></TD>
<TD>This interface defines a logical serial port connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Connection.html"><I>Connection</I></A></B></TD>
<TD>This is the most basic type of generic connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ContentConnection.html"><I>ContentConnection</I></A></B></TD>
<TD>This interface defines the stream connection over which content is passed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Datagram.html"><I>Datagram</I></A></B></TD>
<TD>This is the generic datagram interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="DatagramConnection.html"><I>DatagramConnection</I></A></B></TD>
<TD>This interface defines the capabilities that a datagram connection must have.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="HttpConnection.html"><I>HttpConnection</I></A></B></TD>
<TD>This interface defines the necessary methods and constants for an HTTP connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="HttpsConnection.html"><I>HttpsConnection</I></A></B></TD>
<TD>This interface defines the necessary methods and constants to establish a secure network connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="InputConnection.html"><I>InputConnection</I></A></B></TD>
<TD>This interface defines the capabilities that an input stream connection must have.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="OutputConnection.html"><I>OutputConnection</I></A></B></TD>
<TD>This interface defines the capabilities that an output stream connection must have.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="SecureConnection.html"><I>SecureConnection</I></A></B></TD>
<TD>This interface defines the secure socket stream connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="SecurityInfo.html"><I>SecurityInfo</I></A></B></TD>
<TD>This interface defines methods to access information about a secure network connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ServerSocketConnection.html"><I>ServerSocketConnection</I></A></B></TD>
<TD>This interface defines the server socket stream connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="SocketConnection.html"><I>SocketConnection</I></A></B></TD>
<TD>This interface defines the socket stream connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="StreamConnection.html"><I>StreamConnection</I></A></B></TD>
<TD>This interface defines the capabilities that a stream connection must have.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="StreamConnectionNotifier.html"><I>StreamConnectionNotifier</I></A></B></TD>
<TD>This interface defines the capabilities that a connection notifier must have.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="UDPDatagramConnection.html"><I>UDPDatagramConnection</I></A></B></TD>
<TD>This interface defines a datagram connection which knows it's local end point address.</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Connector.html">Connector</A></B></TD>
<TD>This class is factory for creating new Connection objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="PushRegistry.html">PushRegistry</A></B></TD>
<TD>The <code>PushRegistry</code> maintains a list of inbound connections.</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Exception Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ConnectionNotFoundException.html">ConnectionNotFoundException</A></B></TD>
<TD>This class is used to signal that a connection target cannot be found.</TD>
</TR>
</TABLE>
<P>
<A NAME="package_description"><!-- --></A><H2>
Package javax.microedition.io Description
</H2>
<P>
<p> MID Profile includes networking support based on the <code>Generic Connection</code> framework from the <em>Connected, Limited Device Configuration</em>. </p> <H2>HTTP Networking </H2> <p> In addition to the <code>javax.microedition.io</code> classes specified in the <em>Connected Limited Device Configuration</em> the <em>Mobile Information Device Profile</em> includes the following interface for the HTTP access. An <code>HttpConnection</code> is returned from <code>Connector.open()</code> when an <code>"http://"</code> connection string is accessed.</p> <ul> <li><code>javax.microedition.io.HttpConnection</code></li> </ul> <P> The MIDP extends the connectivity support provided by the Connected, Limited Device Configuration (CLDC) with specific functionality for the <EM>GenericConnection</EM> framework. The MIDP supports a subset of the HTTP protocol, which can be implemented using both IP protocols such as TCP/IP and non-IP protocols such as WAP and i-Mode, utilizing a gateway to provide access to HTTP servers on the Internet.</P> <P> The <EM>GenericConnection</EM> framework is used to support client-server and datagram networks. Using only the protocols specified by the MIDP will allow the application to be portable to all MIDs. MIDP implementations MUST provide support for accessing HTTP 1.1 servers and services.</P> <P> There are wide variations in wireless networks. It is the joint responsibility of the device and the wireless network to provide the application service. It may require a <EM>gateway</EM> that can bridge between the wireless transports specific to the network and the wired Internet. The client application and the Internet server MUST NOT need to be required to know either that non-IP networks are being used or the characteristics of those networks. While the client and server MAY both take advantage of such knowledge to optimize their transmissions, they MUST NOT be required to do so.</P> <P> For example, a MID MAY have no in-device support for the Internet Protocol (IP). In this case, it would utilize a gateway to access the Internet, and the gateway would be responsible for some services, such as DNS name resolution for Internet URLs. The device and network may define and implement security and network access policies that restrict access.</P> <H3>HTTP Network Connection</H3> <IMG SRC="doc-files/MIDP_Networking-4.gif" width=367 height=274> <P> The <EM>GenericConnection</EM> framework from the CLDC provides the base stream and content interfaces. The interface <EM>HttpConnection</EM> provides the additional functionality needed to set request headers, parse response headers, and perform other HTTP specific functions. </P> <P>The interface MUST support:</P> <BLOCKQUOTE> HTTP 1.1 </BLOCKQUOTE> <P> Each device implementing the MIDP MUST support opening connections using the following URL schemes (RFC2396 Uniform Resource Identifiers (URI): Generic Syntax) </P> <BLOCKQUOTE> "http" as defined by RFC2616 <EM>Hypertext Transfer Protocol -- HTTP/1.1</EM> </BLOCKQUOTE> <P> Each device implementing the MIDP MUST support the full specification of RFC2616<BR> HEAD, GET and POST requests. The implementation MUST also support the absolute forms of URIs.</P> <P> The implementation MUST pass all request headers supplied by the application and response headers as supplied by the network server. The ordering of request and response headers MAY be changed. While the headers may be transformed in transit, they MUST be reconstructed as equivalent headers on the device and server. Any transformations MUST be transparent to the application and origin server. The HTTP implementation does not automatically include any headers. The application itself is responsible for setting any request headers that it needs.</P> <P> Connections may be implemented with any suitable protocol providing the ability to reliably transport the HTTP headers and data.(RFC2616 takes great care to not to mandate TCP streams as the only required transport mechanism.) </P> <H3>HTTP Request Headers</H3> <P> The HTTP 1.1 specification provides a rich set of request and response headers that allow the application to negotiate the form, format, language, and other attributes of the content retrieved. In the MIDP, the application is responsible for selection and processing of request and response headers. Only the <EM>User-Agent</EM> header is described in detail. Any other header that is mutually agreed upon with the server may be used.</P> <H3>User-Agent and Accept-Language Request Headers</H3> <P> For the MIDP, a simple <EM >User-Agent</EM> field may be used to identify the current device. As specified by RFC2616, the field contains blank separated features where the feature contains a name and optional version number. </P> <P> The application is responsible for formatting and requesting that the <EM>User-Agent</EM> field be included in HTTP requests via the <EM>setRequestProperty</EM> method in the interface <EM>javax.microedition.io.HttpConnection</EM>. It can supply any application-specific features that are appropriate, in addition to any of the profile-specific request header values listed below.</P> <P> Applications are not required to be loaded onto the device using HTTP. But if they are, then the <EM>User-Agent</EM> request header should be included in requests to load an application descriptor or application JAR file onto the device. This will allow the server to provide the most appropriate application for the device.</P> <P> The user-agent and accept-language fields SHOULD contain the following features as defined by system properties using <EM> java.lang.System.getProperty</EM>. If multiple values are present they will need to be reformatted into individual fields in the request header.</P> <A NAME="UserAgentHeaders"></A> <TABLE BORDER="2"> <H3> System Properties Used for User-Agent and Accept-Language Request Headers</H3> <TR> <TH ROWSPAN="1" COLSPAN="1"> <P> System Property</P> </TH> <TH ROWSPAN="1" COLSPAN="1"> <P> Description</P> </TH> </TR> <TR> <TD ROWSPAN="1" COLSPAN="1"> <P> <EM>microedition.profiles</EM> </P> </TD> <TD ROWSPAN="1" COLSPAN="1"> <P> A blank (Unicode U+0020) separated list of the J2ME profiles that this device supports. For MIDP 2.0 devices, this property MUST contain at least "MIDP-2.0".</P> </TD> </TR> <TR> <TD ROWSPAN="1" COLSPAN="1"> <P> <EM>microedition.configuration</EM> </P> </TD> <TD ROWSPAN="1" COLSPAN="1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -