📄 connector.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.io.OutputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/Connector.html#openOutputStream(java.lang.String)">openOutputStream</A></B>(String name)</CODE><BR> Create and open a connection output stream.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="READ"><!-- --></A><H3>READ</H3><PRE>public static final int <B>READ</B></PRE><DL><DD>Access mode READ. <p>The value <code>1</code> is assigned to <code>READ</code>.</p></DL><HR><A NAME="WRITE"><!-- --></A><H3>WRITE</H3><PRE>public static final int <B>WRITE</B></PRE><DL><DD>Access mode WRITE. <p>The value <code>2</code> is assigned to <code>WRITE</code>.</p></DL><HR><A NAME="READ_WRITE"><!-- --></A><H3>READ_WRITE</H3><PRE>public static final int <B>READ_WRITE</B></PRE><DL><DD>Access mode READ_WRITE. <p>The value <code>3</code> is assigned to <code>READ_WRITE</code>.</p></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="open(java.lang.String)"><!-- --></A><H3>open</H3><PRE>public static Connection <B>open</B>(String name) throws java.io.IOException</PRE><DL><DD>Create and open a Connection.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection.<DT><B>Returns:</B><DD>A new Connection object.<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - If the requested connection cannot be made, or the protocol type does not exist.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If a requested protocol handler is not permitted.</DL></DD></DL><HR><A NAME="open(java.lang.String, int)"><!-- --></A><H3>open</H3><PRE>public static Connection <B>open</B>(String name, int mode) throws java.io.IOException</PRE><DL><DD>Create and open a Connection.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection.<DD><CODE>mode</CODE> - The access mode.<DT><B>Returns:</B><DD>A new Connection object.<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - If the requested connection cannot be made, or the protocol type does not exist.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If a requested protocol handler is not permitted.</DL></DD></DL><HR><A NAME="open(java.lang.String, int, boolean)"><!-- --></A><H3>open</H3><PRE>public static Connection <B>open</B>(String name, int mode, boolean timeouts) throws java.io.IOException</PRE><DL><DD>Create and open a Connection.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection<DD><CODE>mode</CODE> - The access mode<DD><CODE>timeouts</CODE> - A flag to indicate that the caller wants timeout exceptions<DT><B>Returns:</B><DD>A new Connection object<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - if the requested connection cannot be made, or the protocol type does not exist.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If a requested protocol handler is not permitted.</DL></DD></DL><HR><A NAME="openDataInputStream(java.lang.String)"><!-- --></A><H3>openDataInputStream</H3><PRE>public static java.io.DataInputStream <B>openDataInputStream</B>(String name) throws java.io.IOException</PRE><DL><DD>Create and open a connection input stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection.<DT><B>Returns:</B><DD>A DataInputStream.<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - If the connection cannot be found.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If access to the requested stream is not permitted.</DL></DD></DL><HR><A NAME="openDataOutputStream(java.lang.String)"><!-- --></A><H3>openDataOutputStream</H3><PRE>public static java.io.DataOutputStream <B>openDataOutputStream</B>(String name) throws java.io.IOException</PRE><DL><DD>Create and open a connection output stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection.<DT><B>Returns:</B><DD>A DataOutputStream.<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - If the connection cannot be found.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If access to the requested stream is not permitted.</DL></DD></DL><HR><A NAME="openInputStream(java.lang.String)"><!-- --></A><H3>openInputStream</H3><PRE>public static java.io.InputStream <B>openInputStream</B>(String name) throws java.io.IOException</PRE><DL><DD>Create and open a connection input stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection.<DT><B>Returns:</B><DD>An InputStream.<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - If the connection cannot be found.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If access to the requested stream is not permitted.</DL></DD></DL><HR><A NAME="openOutputStream(java.lang.String)"><!-- --></A><H3>openOutputStream</H3><PRE>public static java.io.OutputStream <B>openOutputStream</B>(String name) throws java.io.IOException</PRE><DL><DD>Create and open a connection output stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The URL for the connection.<DT><B>Returns:</B><DD>An OutputStream.<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - If a parameter is invalid.<DD><CODE>ConnectionNotFoundException</CODE> - If the connection cannot be found.<DD><CODE>java.io.IOException</CODE> - If some other kind of I/O error occurs.<DD><CODE>SecurityException</CODE> - If access to the requested stream is not permitted.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Connector.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>MIDP 2.0</strong></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../javax/microedition/io/PushRegistry.html"><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> <A HREF="Connector.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="mailto:jsr-118-comments@jcp.org">Send a comment or suggestion</a> Version 2.0 of Mobile Information Device Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2002 Sun Microsystems, Inc. and Motorola, Inc. All Rights Reserved. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -