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

📄 fileconnection.html

📁 j2me 中从本地读取数据JSR075 API 包括 FileConnection 等
💻 HTML
📖 第 1 页 / 共 5 页
字号:
						or directory is writable.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#create()">create</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a file 
						corresponding to the file string provided in the Connector.open() method for 
						this FileConnection.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#delete()">delete</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes the file or 
						directory specified in the Connector.open() URL.</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/microedition/io/file/FileConnection.html#directorySize(boolean)">directorySize</A></B>(boolean&nbsp;includeSubDirs)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the size 
						in bytes on a file system of all of the files that are contained in a 
						directory.</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/microedition/io/file/FileConnection.html#exists()">exists</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the file 
						or directory specified in the URL passed to the Connector.open() method exists.</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/microedition/io/file/FileConnection.html#fileSize()">fileSize</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the size 
						of a file on the file system.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#getName()">getName</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of 
						a file or directory excluding the URL schema and all paths.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#getPath()">getPath</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the path 
						excluding the file or directory name and the "file" URL schema and host from 
						where the file or directory specified in the Connector.open() method is opened.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#getURL()">getURL</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full 
						file URL including the scheme, host, and path from where the file or directory 
						specified in the Connector.open() method is opened.</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/microedition/io/file/FileConnection.html#isDirectory()">isDirectory</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the URL 
						passed to the Connector.open() is a directory.</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/microedition/io/file/FileConnection.html#isHidden()">isHidden</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the file 
						is hidden.</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/microedition/io/file/FileConnection.html#isOpen()">isOpen</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an 
						indication of whether the file connection is currently open or not.</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/microedition/io/file/FileConnection.html#lastModified()">lastModified</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time 
						that the file denoted by the URL specified in the Connector.open() method was 
						last modified.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#list()">list</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a list of all 
						visible files and directories contained in a directory.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#list(java.lang.String, boolean)">list</A></B>(java.lang.String&nbsp;filter, 
							boolean&nbsp;includeHidden)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a filtered 
						list of files and directories contained in a directory.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#mkdir()">mkdir</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a directory 
						corresponding to the directory string provided in the Connector.open() method.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.io.DataInputStream</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#openDataInputStream()">openDataInputStream</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open and return a 
						data input stream for a connection.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.io.DataOutputStream</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#openDataOutputStream()">openDataOutputStream</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open and return a 
						data output stream for a connection.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.io.InputStream</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#openInputStream()">openInputStream</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open and return an 
						input stream for a connection.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#openOutputStream()">openOutputStream</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open and return an 
						output stream for a connection.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.io.OutputStream</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#openOutputStream(long)">openOutputStream</A></B>(long&nbsp;byteOffset)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method opens 
						an output stream and positions it at the indicated byte offset in the file.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#rename(java.lang.String)">rename</A></B>(java.lang.String&nbsp;newName)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renames the 
						selected file or directory to a new name in the same directory.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#setFileConnection(java.lang.String)">setFileConnection</A></B>(java.lang.String&nbsp;fileName)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets this 
						FileConnection object to another file or directory.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#setHidden(boolean)">setHidden</A></B>(boolean&nbsp;hidden)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the hidden 
						attribute of the selected file to the value provided.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#setReadable(boolean)">setReadable</A></B>(boolean&nbsp;readable)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the file or 
						directory readable attribute to the indicated value.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#setWritable(boolean)">setWritable</A></B>(boolean&nbsp;writable)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the selected 
						file or directory writable attribute to the indicated value.</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/microedition/io/file/FileConnection.html#totalSize()">totalSize</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the 
						total size of the file system the connection's target resides on.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../../javax/microedition/io/file/FileConnection.html#truncate(long)">truncate</A></B>(long&nbsp;byteOffset)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Truncates the file, 
						discarding all data from the given byte offset to the current end of the file.</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/microedition/io/file/FileConnection.html#usedSize()">usedSize</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the used 
						memory of a file system the connection's target resides on.</TD>
				</TR>
			</TABLE>
			&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.io.Connection"><!-- --></A>
			<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
				<TR BGCOLOR="#eeeeff" CLASS="TableSubHeadingColor">
					<TD><B>Methods inherited from interface javax.microedition.io.Connection</B></TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD><CODE>close</CODE></TD>
				</TR>
			</TABLE>
		&nbsp;
		<P>
			<!-- ============ FIELD DETAIL =========== -->
			<!-- ========= 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="isOpen()"><!-- --></A><H3>
				isOpen</H3>
			<PRE>
public boolean <B>isOpen</B>()</PRE>
			<DL>
				<DD>
					Returns an indication of whether the file connection is currently open or not.
					<P></P>
					<DD>
						<DL>
						</DL>
						<DD>
							<DL>
								<DT><B>Returns:</B><DD>true if the file connection is open, false otherwise.</DD></DL>
						</DD>
			</DL>
			<HR>
			<A NAME="openInputStream()"><!-- --></A><H3>
				openInputStream</H3>

⌨️ 快捷键说明

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