<!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_03) on Mon Oct 10 16:31:48 CEST 2005 -->
<TITLE>
FileConnection (IM Profile)
</TITLE>

<META NAME="keywords" CONTENT="com.siemens.icm.io.file.FileConnection interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="FileConnection (IM Profile)";
}
</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="class-use/FileConnection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file"><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="FileConnection.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">
com.siemens.icm.io.file</FONT>
<BR>
Interface FileConnection</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../javax/microedition/io/Connection.html" title="interface in javax.microedition.io">Connection</A>, <A HREF="../../../../../javax/microedition/io/InputConnection.html" title="interface in javax.microedition.io">InputConnection</A>, <A HREF="../../../../../javax/microedition/io/OutputConnection.html" title="interface in javax.microedition.io">OutputConnection</A>, <A HREF="../../../../../javax/microedition/io/StreamConnection.html" title="interface in javax.microedition.io">StreamConnection</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>FileConnection</B><DT>extends <A HREF="../../../../../javax/microedition/io/StreamConnection.html" title="interface in javax.microedition.io">StreamConnection</A></DL>

<P>
This interface is intended to access files or directories that are located on
 removeable media and/or file systems on a device.

 <P>
 Device internal filesystems in memory may also be accessed through
 this class as well, provided there is underlying hardware and OS support.
 If file connections are not supported to a particular media or file system,
 attempts to open a file connection to the media or file system through
 <code>Connector.open()</code> results in an
 <code>javax.microedition.io.IOException</code> being thrown.
 </P>
 <H2>Establishing a Connection</H2>
 <P>The format of the input string used to access a FileConnection through
 <code>Connector.open()</code> must follow the format of a fully-qualified,
 absolute path file name as described by the file
 URL format in IETF RFCs 1738 & 2396.  Further detail for the File
 URL format can be found in the com.siemens.mp.microedition.io.file package description.
 </P>
 <p>A single connection object only references a single file or
 directory at a time. In some cases, a connection object can be reused to
 refer to a different file or directory than it was originally associated with
 (see <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#setFileConnection(java.lang.String)"><CODE>setFileConnection(java.lang.String)</CODE></A>).  In general, the best approach to reference
 a different file or directory is by establishing a completely separate
 connection through the <code>Connector.open()</code> method.</p>

 <H2>FileConnection Behavior</H2>

 <p>File connection is different from other Generic Connection Framework
 connections in that a connection object can be successfully returned from
 the <code>Connector.open()</code> method without actually referencing an
 existing entity (in this case, a file or directory). This behavior
 allows the creation of new files and directories on a file system.
 For example, the following code can be used to create
 a new file on a file system, where <I>CFCard</I> is a valid existing file
 system root name for a given implementation:</p>
 <code>
 <pre>
 try {
     FileConnection fconn = (FileConnection)Connector.open(&quot;file:///CFCard/newfile.txt&quot;);
      // If no exception is thrown, then the URI is valid, but the file may or may not exist.
      if (!fconn.exists())
          fconn.create();  // create the file if it doesn't exist

      fconn.close();
 }
 catch (IOException ioe) {
 }</pre>
 </code>
 <p>
 Developers should always check for the file's or directory's existence
 after a connection is established to determine if the file or directory
 actually exists. Similarly, files or directories can be deleted using the
 <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#delete()"><CODE>delete()</CODE></A> method, and developers should close the connection
 immediately after deletion to prevent exceptions from accessing a connection
 to a non-existent file or directory.
 </p>
 <P>
 A file connection's open status is unaffected by the opening and closing of
 input and output streams from the file connection; the file connection stays
 open until <code>close()</code> is invoked on the FileConnection instance.
 Input and output streams may be opened and closed multiple times on a
 FileConnection instance.
 </P>
 <p>
 All <code>FileConnection</code> instances have one underlying
 <code>InputStream</code> and one <code>OutputStream</code>. Opening a
 <code>DataInputStream</code> counts as opening an <code>InputStream,</code>
 and opening a <code>DataOutputStream</code> counts as opening an
 <code>OutputStream</code>. A <code>FileConnection</code> instance can have
 only one <code>InputStream</code> and one <code>OutputStream</code> open at
 any one time. Trying to open more than one <code>InputStream</code> or more
 than one <code>OutputStream</code> from a <code>StreamConnection</code>
 causes an <code>IOException</code>. Trying to open an <code>InputStream</code>
 or an <code>OutputStream</code> after the <code>FileConnection</code> has
 been closed causes an <code>IOException</code>.
 </p>
 <p>
 The inherited <code>StreamConnection</code> methods in a
 <code>FileConnection</code> instance are not synchronized. The only stream
 method that can be called safely from another thread is <code>close</code>.
 When <code>close</code> is invoked on a stream that is executing in another
 thread, any pending I/O method MUST throw an
 <code>InterruptedIOException</code>. In the above case, implementations
 SHOULD try to throw the exception in a timely manner. When all open streams
 have been closed, and when the <code>FileConnection</code> is closed, any
 pending I/O operations MUST be interrupted in a timely manner.
 </p>
 <p>
 Data written to the output streams of these <code>FileConnection</code>
 objects is not guaranteed to be flushed to the stream's destination
 (and subsequently made available to any input streams) until either
 <code>flush()</code> or <code>close()</code> is invoked on the stream.
 </p>
 <h2>Security</h2>
 <P>
 Access to file connections is restricted to prevent unauthorized manipulation
 of data. The access security model applied to the file connection
 is defined by the implementing profile. The security model is applied on
 the invocation of the <code>Connector.open()</code> method with a valid file
 connection string.  The mode provided in the <code>open()</code> method
 (<code>Connector.READ_WRITE</code> by default) indicates the application's
 request for access rights for the indicated file or directory and is
 therefore checked against the security scheme.  All three connections modes
 (<code>READ_WRITE, WRITE_ONLY,</code> and <code>READ_ONLY</code>) are
 supported for a file connection and determine the access requested from the
 security model.
 </P>
 <P>
 The security model is also applied during use of the returned
 FileConnection, specifically when the methods
 <code>openInputStream()</code>, <code>openDataInputStream()</code>,
 <code>openOutputStream()</code>, and <code>openDataOutputStream()</code> are
 invoked. These methods have implied request for access rights (i.e.
 input stream access is requesting read access, and output stream access is
 requesting write access).  Should the application not be granted the
 appropriate read or write access to the file or file system by the profile
 authorization scheme, a <code>java.lang.SecurityException</code> is thrown.
 </P>
 <P>
 File access through the File Connection API may be restricted to files that
 are within a public context and not deemed private or sensitive. This
 restriction is intended to protect the device's and other users' files and
 data from both malicious and unintentional access. RMS databases cannot be
 accessed using the File Connection API. Access to files and directories that
 are private to another application, files and directories that are private to
 a different user than the current user, system configuration files, and
 device and OS specific files and directories may be restricted. In these
 situations, a <code>java.lang.SecurityException</code> is thrown from the
 <code>Connector.open()</code> method if the file, file system, or directory
 is not allowed to be accessed.
 </P>

 <h2>Permissions</h2>
 <p>Permissions are the MIDP 2.0 mechanism by which a MIDlet may request security
 access to protected APIs or functions.&nbsp; A MIDlet can request access by including the
 permissions in the <code>MIDlet-Permissions</code> and <code>MIDlet-Permissions-Opt</code>
 attributes in its JAD or manifest.&nbsp; Table 1 defines the permissions
 applicable to the FileConnection APIs, and the API methods that are protected by
 those permissions:</p>
 <p align="center"><i>Table 1: FileConnection Permissions and Protected Methods</i></p>
 <table border="1" width="100%">
   <tr>
     <th>Permission</th>
     <th>Protected API Calls</th>
   </tr>
   <tr>
     <td valign="top"><code>javax.microedition.io.Connector.file.read</code></td>
     <td valign="top"><code>com.siemens.mp.microedition.io.Connector </code>methods:<br>
       <code>&nbsp;&nbsp; </code><code>open(&quot;file://...&quot;)</code><code><br>
       &nbsp;&nbsp; open(&quot;file://...&quot;, Connector.READ)<br>
       &nbsp;&nbsp; open(&quot;file://...&quot;, Connector.READ_WRITE)<br>
       &nbsp;&nbsp; openDataInputStream(&quot;file://...&quot;)<br>
       &nbsp;&nbsp; openInputStream(&quot;file://...&quot;)</code>
       <p><code>com.siemens.mp.microedition.io.file.FileConnection</code> methods:<br>
       <code>
       &nbsp;&nbsp; setFileConnection</code>, when instance opened with READ<br>
       <code>&nbsp;&nbsp; setFileConnection</code>, when instance opened with
       READ_WRITE<br>
       </p>
       <p><code>com.siemens.mp.microedition.io.file.FileSystemRegistry </code>methods:<br>
       <code>&nbsp;&nbsp; addFileSystemListener<br>
       &nbsp;&nbsp; listRoots</code></td>
   </tr>
   <tr>
     <td valign="top"><code>javax.microedition.io.Connector.file.write</code></td>
     <td valign="top"><code>com.siemens.mp.microedition.io.Connector </code>methods:<br>
       <code>&nbsp;&nbsp; </code><code>open(&quot;file://...&quot;)</code><code><br>
       &nbsp;&nbsp; open(&quot;file://...&quot;, Connector.WRITE)<br>
       &nbsp;&nbsp; open(&quot;file://...&quot;, Connector.READ_WRITE)<br>
       &nbsp;&nbsp; openDataOutputStream(&quot;file://...&quot;)<br>
       &nbsp;&nbsp; openOutputStream(&quot;file://...&quot;)</code>
       <p><code>com.siemens.mp.microedition.io.file.FileConnection</code> methods:<br>
       <code>
       &nbsp;&nbsp; setFileConnection</code>, when instance opened with WRITE<br>
       <code>&nbsp;&nbsp; setFileConnection</code>, when instance opened with
       READ_WRITE</td>
   </tr>
 </table>
 <p>Note that the following protected API calls from the Table 1 require both <code>read</code>
 and <code>write</code> permissions:</p>
 <blockquote>
   <p><code>Connector.open(&quot;file://...&quot;)<br>
   Connector.open(&quot;file://...&quot;, Connector.READ_WRITE)<br>
   FileConnection.setFileConnection(&quot;file://...&quot;) </code>if the FileConnection instance
   is opened in READ_WRITE</p>
 </blockquote>
   <h2>Permission Scope</h2>
 <p>It should be noted that the permissions protect API calls, regardless of the
 data that is being accessed.&nbsp; For example, a successful grant of READ_WRITE
 access to the&nbsp; <code>Connector.open(&quot;file://...&quot;) </code>method
 allows the application to read/write any file or directory, not just the
 file/directory used as the method's parameter.&nbsp; The parameters of the API
 calls (which indicate the data being accessed)&nbsp; is not a factor at all in
 the granting of the permissions, as dictated by MIDP 2.0 security
 definitions.&nbsp;&nbsp; For this reason, it is recommended that a user
 interaction mode of &quot;one-shot&quot; be used when user authorization is
 required so that the user is notified on every instance that a file or directory
 is accessed.</p>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>FileConnection 1.0</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileSystemRegistry.html" title="class in com.siemens.icm.io.file"><CODE>FileSystemRegistry</CODE></A></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== 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;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#availableSize()">availableSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the free memory that is available on the file system the file
 or directory resides on. </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="../../../../../com/siemens/icm/io/file/FileConnection.html#canRead()">canRead</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the file or directory is readable.  </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="../../../../../com/siemens/icm/io/file/FileConnection.html#canWrite()">canWrite</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the file 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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/util/Enumeration.html" title="interface in java.util">Enumeration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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 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;<A HREF="../../../../../java/util/Enumeration.html" title="interface in java.util">Enumeration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#list(java.lang.String, boolean)">list</A></B>(<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A>&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="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/io/DataInputStream.html" title="class in java.io">DataInputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/io/DataOutputStream.html" title="class in java.io">DataOutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/io/InputStream.html" title="class in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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;<A HREF="../../../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/io/file/FileConnection.html#rename(java.lang.String)">rename</A></B>(<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A>&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="../../../../../com/siemens/icm/io/file/FileConnection.html#setFileConnection(java.lang.String)">setFileConnection</A></B>(<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A>&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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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="../../../../../com/siemens/icm/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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.io.<A HREF="../../../../../javax/microedition/io/Connection.html" title="interface in javax.microedition.io">Connection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../javax/microedition/io/Connection.html#close()">close</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<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>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the file connection is open, false otherwise.</DL>
</DD>
</DL>
<HR>

<A NAME="openInputStream()"><!-- --></A><H3>
openInputStream</H3>
<PRE>
public <A HREF="../../../../../java/io/InputStream.html" title="class in java.io">InputStream</A> <B>openInputStream</B>()
                            throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Open and return an input stream for a connection.  The connection's
 target must already exist and be accessible for the input stream to be created.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../javax/microedition/io/InputConnection.html#openInputStream()">openInputStream</A></CODE> in interface <CODE><A HREF="../../../../../javax/microedition/io/InputConnection.html" title="interface in javax.microedition.io">InputConnection</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>An open input stream
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs, if the method is invoked on
          a directory, if the connection's target does not
          yet exist, or the connection's target is not accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - If the application is not granted read
          access to the connection's target.</DL>
</DD>
</DL>
<HR>

<A NAME="openDataInputStream()"><!-- --></A><H3>
openDataInputStream</H3>
<PRE>
public <A HREF="../../../../../java/io/DataInputStream.html" title="class in java.io">DataInputStream</A> <B>openDataInputStream</B>()
                                    throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Open and return a data input stream for a connection. The connection's
 target must already exist and be accessible for the input stream to be created.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../javax/microedition/io/InputConnection.html#openDataInputStream()">openDataInputStream</A></CODE> in interface <CODE><A HREF="../../../../../javax/microedition/io/InputConnection.html" title="interface in javax.microedition.io">InputConnection</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>An open input stream
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - If an I/O error occurs, if the method is invoked on
          a directory, if the connection's target does not
          yet exist, or the connection's target is not accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - If the application is not granted read
          access to the connection's target.</DL>
</DD>
</DL>
<HR>

<A NAME="openOutputStream()"><!-- --></A><H3>
openOutputStream</H3>
<PRE>
public <A HREF="../../../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> <B>openOutputStream</B>()
                              throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Open and return an output stream for a connection. The output stream
 is positioned at the start of the file. Writing data to the output stream
 overwrites the contents of the files (i.e. does not insert data).
 Writing data to output streams beyond the current end of file
 automatically extends the file size.  The connection's target must
 already exist and be accessible for the output stream to be created.
 <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#openOutputStream(long)"><CODE>openOutputStream(long)</CODE></A> should be used to position an output
 stream to a different position in the file.
 <P>
 Changes made to a file through an output stream may not be immediately
 made to the actual file residing on the file system because
 platform and implementation specific use of caching and buffering of the
 data.  Steam contents and file length extensions are not necessarily
 visible outside of the application immediately unless
 <code>flush()</code> is called on the stream. The returned output stream
 is automatically and synchronously flushed when it is closed.
 </P>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../javax/microedition/io/OutputConnection.html#openOutputStream()">openOutputStream</A></CODE> in interface <CODE><A HREF="../../../../../javax/microedition/io/OutputConnection.html" title="interface in javax.microedition.io">OutputConnection</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>An open output stream
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - If an I/O error occurs, if the method is invoked on
          a directory, the file does not yet exist, or the connection's
          target is not accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - If the application is not granted write
          access to the connection's target.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#openOutputStream(long)"><CODE>openOutputStream(long)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="openDataOutputStream()"><!-- --></A><H3>
openDataOutputStream</H3>
<PRE>
public <A HREF="../../../../../java/io/DataOutputStream.html" title="class in java.io">DataOutputStream</A> <B>openDataOutputStream</B>()
                                      throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Open and return a data output stream for a connection. The output stream
 is positioned at the start of the file. Writing data to the output stream
 overwrites the contents of the files (i.e. does not insert data).
 Writing data to output streams beyond the current end of file
 automatically extends the file size.  The connection's target must
 already exist and be accessible for the output stream to be created.
 <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#openOutputStream(long)"><CODE>openOutputStream(long)</CODE></A> should be used to position an output
 stream to a different position in the file.
 <P>
 Changes made to a file through an output stream may not be immediately
 made to the actual file residing on the file system because
 platform and implementation specific use of caching and buffering of the
 data. Steam contents and file length extensions are not necessarily
 visible outside of the application immediately unless
 <code>flush()</code> is called on the stream. The returned output stream
 is automatically and synchronously flushed when it is closed.
 </P>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../javax/microedition/io/OutputConnection.html#openDataOutputStream()">openDataOutputStream</A></CODE> in interface <CODE><A HREF="../../../../../javax/microedition/io/OutputConnection.html" title="interface in javax.microedition.io">OutputConnection</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>An open output stream
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - If an I/O error occurs, if the method is invoked on
          a directory, the file does not yet exist, or the connection's
          target is not accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - If the application is not granted write
          access to the connection's target.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#openOutputStream(long)"><CODE>openOutputStream(long)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="openOutputStream(long)"><!-- --></A><H3>
openOutputStream</H3>
<PRE>
public <A HREF="../../../../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> <B>openOutputStream</B>(long&nbsp;byteOffset)
                              throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>This method opens an output stream and positions it at the indicated
 byte offset in the file.  Data written to the returned output stream at
 that position overwrites any existing data until EOF is reached, and
 then additional data is appended. The connection's target must
 already exist and be accessible for the output stream to be created.
 <P>
 Changes made to a file through an output stream may not be immediately
 made to the actual file residing on the file system because
 platform and implementation specific use of caching and buffering of the
 data. Steam contents and file length extensions are not necessarily
 visible outside of the application immediately unless
 <code>flush()</code> is called on the stream. The returned output
 stream is automatically and synchronously flushed when it is closed.
 </P>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>byteOffset</CODE> - number of bytes to skip over from the beginning of
          the file when positioning the start of the OutputStream.  If
          the provided offset is larger than or equal to the current file
          size, the OutputStream is positioned at the current end of the
          file for appending.
<DT><B>Returns:</B><DD>an open OutputStream positioned at the byte offset in the file,
          or the end of the file if the offset is greater than the size
          of the file.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - If an I/O error occurs, if the method is invoked
          on a directory, the file does not yet exist, or the
          connection's target is not accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security if the application does not
          allow write access to the file.
<DD><CODE><A HREF="../../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</A></CODE> - if byteOffset has a negative value.</DL>
</DD>
</DL>
<HR>

<A NAME="totalSize()"><!-- --></A><H3>
totalSize</H3>
<PRE>
public long <B>totalSize</B>()</PRE>
<DL>
<DD>Determines the total size of the file system the connection's target
 resides on.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The total size of the file system in bytes, or -1 if the
          file system is not accessible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access to the root volume.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="availableSize()"><!-- --></A><H3>
availableSize</H3>
<PRE>
public long <B>availableSize</B>()</PRE>
<DL>
<DD>Determines the free memory that is available on the file system the file
 or directory resides on. This may only be an estimate and may vary based
 on platform-specific file system blocking and metadata information.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The available size in bytes on a file system, or -1 if the
          file system is not accessible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access to the root volume.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the directory but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="usedSize()"><!-- --></A><H3>
usedSize</H3>
<PRE>
public long <B>usedSize</B>()</PRE>
<DL>
<DD>Determines the used memory of a file system the connection's target
 resides on.  This may only be an estimate and may vary based
 on platform-specific file system blocking and metadata information.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The used size of bytes on a file system, or -1 if the file
          system is not accessible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access to the root volume.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the directory but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="directorySize(boolean)"><!-- --></A><H3>
directorySize</H3>
<PRE>
public long <B>directorySize</B>(boolean&nbsp;includeSubDirs)
                   throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Determines the size in bytes on a file system of all of the files
 that are contained in a directory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>includeSubDirs</CODE> - If set to true, the method determines
                       the size of the given directory and all subdirs
                       recursively. If false, the method returns the size
                       of the files in the directory only.
<DT><B>Returns:</B><DD>The size in bytes occupied by the files included in the
          directory, or -1 if the directory does not exist or is not
          accessible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the method is invoked on a file.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the directory.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the directory but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="fileSize()"><!-- --></A><H3>
fileSize</H3>
<PRE>
public long <B>fileSize</B>()
              throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Determines the size of a file on the file system. The size of a file
 always represents the number of bytes contained in the file; there is
 no pre-allocated but empty space in a file.
 <P>
 <code>fileSize()</code> always returns size of the file on the file system,
 and not in any pending output stream. <code>flush()</code> should be used
 before calling <code>fileSize()</code> to ensure the contents
 of the output streams opened to the file get written to the file system.
</P>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The size in bytes of the selected file, or -1 if the
          file does not exist or is not accessible.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the method is invoked on a directory.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the file.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the file but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="canRead()"><!-- --></A><H3>
canRead</H3>
<PRE>
public boolean <B>canRead</B>()</PRE>
<DL>
<DD>Checks if the file or directory is readable.  This method checks the
 attributes associated with a file or directory by the underlying file
 system.  Some file systems may not support associating attributes with
 a file, in which case this method returns true.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the connection's target exists, is accessible, and
          is readable, otherwise false.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#setReadable(boolean)"><CODE>setReadable(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="canWrite()"><!-- --></A><H3>
canWrite</H3>
<PRE>
public boolean <B>canWrite</B>()</PRE>
<DL>
<DD>Checks if the file or directory is writable. This method checks the
 attributes associated with a file or directory by the underlying file
 system.  Some file systems may not support associating attributes with
 a file, in which case this method returns true.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the  connection's target exists, is accessible, and
          is writable, otherwise false.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#setWritable(boolean)"><CODE>setWritable(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="isHidden()"><!-- --></A><H3>
isHidden</H3>
<PRE>
public boolean <B>isHidden</B>()</PRE>
<DL>
<DD>Checks if the file is hidden.  The exact definition of hidden is
 system-dependent. For example, on UNIX systems a file is considered to be
 hidden if its name begins with a period character ('.'). On Win32 and
 FAT file systems, a file is considered to be hidden if it has been marked
 as such in the file's attributes.  If hidden files are not supported on
 the referenced file system, this method always returns false.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the file exists, is accessible, and is hidden,
          otherwise false.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#setHidden(boolean)"><CODE>setHidden(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setReadable(boolean)"><!-- --></A><H3>
setReadable</H3>
<PRE>
public void <B>setReadable</B>(boolean&nbsp;readable)
                 throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Sets the file or directory readable attribute to the
 indicated value.  The readable attribute for the file on the actual
 file system is set immediately upon invocation of this method. If the
 file system doesn't support a settable read attribute, this method is
 ignored and <code>canRead()</code> always returns true.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>readable</CODE> - The new state of the readable flag of the selected file.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - of the connection's target does not exist or is not
          accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
            have write access to the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
            to the connection's target but has opened the connection in
            <code>Connector.READ</code> mode.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#canRead()"><CODE>canRead()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setWritable(boolean)"><!-- --></A><H3>
setWritable</H3>
<PRE>
public void <B>setWritable</B>(boolean&nbsp;writable)
                 throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Sets the selected file or directory writable attribute to the
 indicated value.  The writable attribute for the file on the actual
 file system is set immediately upon invocation of the method. If the
 file system doesn't support a settable write attribute, this method is
 ignored and <code>canWrite()</code> always returns true.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>writable</CODE> - The new state of the writable flag of the selected file.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the connection's target does not exist or is not
          accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have write access to the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#canWrite()"><CODE>canWrite()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setHidden(boolean)"><!-- --></A><H3>
setHidden</H3>
<PRE>
public void <B>setHidden</B>(boolean&nbsp;hidden)
               throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Sets the hidden attribute of the selected file to
 the value provided.  The attribute is applied to the file on the actual
 file system immediately upon invocation of this method if the file system
 and platform support it. If the file system doesn't support a hidden
 attribute, this method is ignored and <code>isHidden()</code> always
 returns false.  Since the exact definition of hidden is system-dependent,
 this method only works on file systems that support a settable file
 attribute. For example, on Win32 and FAT file systems, a file may be
 considered hidden if it has been marked as such in the file's
 attributes; therefore this method is applicable.  However on UNIX
 systems a file may be considered to be hidden if its name begins with a
 period character ('.'). In the UNIX case, this method may be ignored and
 the method to make a file hidden may be the <code>rename()</code> method.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hidden</CODE> - The new state of the hidden flag of the selected file.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the connection's target does not exist or is not
          accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
            have write access to the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
            to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#isHidden()"><CODE>isHidden()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="list()"><!-- --></A><H3>
list</H3>
<PRE>
public <A HREF="../../../../../java/util/Enumeration.html" title="interface in java.util">Enumeration</A> <B>list</B>()
                 throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Gets a list of all files and directories contained in a directory.
 The directory is the connection's target as specified in
 <code>Connector.open()</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>An Enumeration of strings, denoting the files and
           directories in the directory.  The string returned contain only
           the file or directory name and does not contain any path prefix
           (to get a complete path for each file or directory, prepend
          <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#getPath()"><CODE>getPath()</CODE></A>). Directories are denoted with a
          trailing slash "/" in their returned name.  The Enumeration has
          zero length if the directory is empty. Any
           hidden files and directories in the directory are not included
          in the returned list.  Any current directory indication (".")
          and any parent directory indication ("..") is not included
          in the list of files and directories returned.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if invoked on a file, the directory does not exist,
          the directory is not accessible, or an I/O error occurs.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
            have read access for the directory.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
            to the directory but has opened the connection in
          <code>Connector.WRITE</code> mode.</DL>
</DD>
</DL>
<HR>

<A NAME="list(java.lang.String, boolean)"><!-- --></A><H3>
list</H3>
<PRE>
public <A HREF="../../../../../java/util/Enumeration.html" title="interface in java.util">Enumeration</A> <B>list</B>(<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;filter,
                        boolean&nbsp;includeHidden)
                 throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Gets a filtered list of files and directories contained in a directory.
 The directory is the connection's target as specified in
 <code>Connector.open()</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filter</CODE> - String against which all files and directories are
          matched for retrieval.  An asterisk ("*") can be used as a
          wildcard to represent 0 or more occurrences of any character.<DD><CODE>includeHidden</CODE> - boolean indicating whether files marked as hidden
          should be included or not in the list of files and directories
          returned.
<DT><B>Returns:</B><DD>An Enumeration of strings, denoting the files and directories
          in the directory matching the filter. Directories are denoted
          with a trailing slash "/" in their returned name.  The
          Enumeration has zero length if the directory is empty or no
          files and/or directories are found matching the given filter.
          Any current directory indication (".") and any parent directory
          indication ("..") is not included in the list of files and
          directories returned.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if invoked on a file, the directory does not exist,
          the directory is not accessible, or an I/O error occurs.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the directory.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>filter</code> is
          <code>null</code>.
<DD><CODE><A HREF="../../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</A></CODE> - if filter contains any path
          specification or is an invalid filename for the platform
          (e.g. contains characters invalid for a filename on the platform).</DL>
</DD>
</DL>
<HR>

<A NAME="create()"><!-- --></A><H3>
create</H3>
<PRE>
public void <B>create</B>()
            throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Creates a file corresponding to the file string
 provided in the Connector.open() method for this FileConnection.  The
 file is created immediately on the actual file system upon invocation of
 this method.  Files are created with zero length and data can be put into
 the file through output streams opened on the file. This method creates
 non existing directories specified in the file's path.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have write access for the file.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the file but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if invoked on an existing file is used to
          create directories), the connection's target has a
          trailing "/" to denote a directory, the target file system
          is not accessible, or an unspecified error occurs preventing
          creation of the file.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="mkdir()"><!-- --></A><H3>
mkdir</H3>
<PRE>
public void <B>mkdir</B>()
           throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Creates a directory corresponding to the directory
 string provided in the Connector.open() method.
 The directory is created immediately on the actual
 file system upon invocation of this method.  Directories in the
 specified path are not recursively created and must be explicitly
 created before subdirectories can be created.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have write access to the directory.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the directory but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if invoked on an existing directory or on any file
          (<code>create()</code> is used to create files), the target
          file sytem is not accessible, or an unspecified error occurs
          preventing creation of the directory.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="exists()"><!-- --></A><H3>
exists</H3>
<PRE>
public boolean <B>exists</B>()</PRE>
<DL>
<DD>Checks if the file or directory specified in the URL passed to the
 Connector.open() method exists.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if the connnection's target exists and is accessible,
          otherwise false.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="isDirectory()"><!-- --></A><H3>
isDirectory</H3>
<PRE>
public boolean <B>isDirectory</B>()</PRE>
<DL>
<DD>Checks if the URL passed to the Connector.open() is a directory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>True if the connection's target exists, is accessible, and
           is a directory, otherwise false.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.</DL>
</DD>
</DL>
<HR>

<A NAME="delete()"><!-- --></A><H3>
delete</H3>
<PRE>
public void <B>delete</B>()
            throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Deletes the file or directory specified in the
 Connector.open() URL.  The file or directory is deleted immediately on
 the actual file system upon invocation of this method.  All open input
 and output streams are automatically flushed and closed.  Attempts to
 further use those streams result in an <code>IOException</code>. The
 FileConnection instance object remains open and available for use.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have write access to the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - If the target is a directory and it is not empty,
          the connection target does not exist or is unaccessible, or
          an unspecified error occurs preventing deletion of the target.</DL>
</DD>
</DL>
<HR>

<A NAME="rename(java.lang.String)"><!-- --></A><H3>
rename</H3>
<PRE>
public void <B>rename</B>(<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;newName)
            throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Renames the selected file or directory to a new name in the same
 directory.  The file or directory is renamed immediately on the actual
 file system upon invocation of this method. No file or directory by the
 original name exists after this method call.  All previously open
 input and output streams are automatically flushed and closed.  Attempts
 to further use those streams result in an <code>IOException</code>.  The
 FileConnection instance object remains open and available for use,
 referring now to the file or directory by its new name.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newName</CODE> - The new name of the file or directory.  The name must
          not contain any path specification; the file or directory
          remains in its same directory as before this method call.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the connection's target does not exist, the
          connection's target is not accessible, a file or directory
          already exists by the <code>newName</code>, or
          <code>newName</code> is an invalid filename for the platform
          (e.g. contains characters invalid in a filename on the platform).
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have write access to the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the connection's target but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>newName</code> is
          <code>null</code>.
<DD><CODE><A HREF="../../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</A></CODE> - if <code>newName</code> contains any
          path specification.</DL>
</DD>
</DL>
<HR>

<A NAME="truncate(long)"><!-- --></A><H3>
truncate</H3>
<PRE>
public void <B>truncate</B>(long&nbsp;byteOffset)
              throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Truncates the file, discarding all data from the given byte offset to
 the current end of the file.  If the byte offset provided is greater
 than or equal to the file's current byte count, the method returns
 without changing the file.  Any open streams are flushed automatically
 before the truncation occurs.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>byteOffset</CODE> - the offset into the file from which truncation
          occurs.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if invoked on a directory or the file does not exist
          or is not accessible.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have write access to the file.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have write access
          to the file but has opened the connection in
          <code>Connector.READ</code> mode.
<DD><CODE><A HREF="../../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</A></CODE> - if <code>byteOffset</code> is
          less than zero.</DL>
</DD>
</DL>
<HR>

<A NAME="setFileConnection(java.lang.String)"><!-- --></A><H3>
setFileConnection</H3>
<PRE>
public void <B>setFileConnection</B>(<A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;fileName)
                       throws <A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Resets this FileConnection object to another file or directory.  This
 allows reuse of the FileConnection object for directory traversal.  The
 current FileConnection object must refer to a directory, and the new
 file or directory must exist within this directory, or may be the
 string ".." used to indicate the parent directory for the current
 connection).  The FileConnection instance object remains open and
 available for use, referring now to the newly specified file or
 directory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - name of the file or directory to which this
          FileConnection is reset. The fileName must be one of the
          values returned from the <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#list()"><CODE>list()</CODE></A> method, or the string
          ".." to indicate the parent directory of the current
          connection.  The fileName must not contain any additional path
          specification; i.e. the file or directory must reside within
          the current directory.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if <code>fileName</code> is
          <code>null</code>.
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have the security access to the specified file or directory
          as requested in the Connector.open method
          invocation that originally opened this FileConnection.
<DD><CODE><A HREF="../../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</A></CODE> - if <code>fileName</code> contains any
          path specification or does not yet exist.
<DD><CODE><A HREF="../../../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the current FileConnection is opened on a file,
          the connection's target is not accessible, or
          <code>fileName</code> is an invalid filename for the platform
          (e.g. contains characters invalid in a filename on the platform).
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<HR>

<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public <A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A> <B>getName</B>()</PRE>
<DL>
<DD>Returns the name of a file or directory excluding the URL schema and
 all paths.  Directories are denoted with a
 trailing slash "/" in their returned name.  The String resulting
 from this method looks as follows:
 <pre>
   &lt;directory&gt;/
 </pre>
 or
 <pre>
   &lt;filename.extension&gt;
 </pre>
 or if no file extension
 <pre>
   &lt;filename&gt;
 </pre>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The name of a file or directory.</DL>
</DD>
</DL>
<HR>

<A NAME="getPath()"><!-- --></A><H3>
getPath</H3>
<PRE>
public <A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A> <B>getPath</B>()</PRE>
<DL>
<DD>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. <A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html#getName()"><CODE>getName()</CODE></A> can be appended to
 this value to get a fully qualified path filename.  The String resulting
 from this method looks as follows:
 <pre>
   /&lt;root&gt;/&lt;directory&gt;/
 </pre>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The path of a file or directory in the format specified above.</DL>
</DD>
</DL>
<HR>

<A NAME="getURL()"><!-- --></A><H3>
getURL</H3>
<PRE>
public <A HREF="../../../../../java/lang/String.html" title="class in java.lang">String</A> <B>getURL</B>()</PRE>
<DL>
<DD>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.  The string returned is in
 an escaped ASCII format as defined by RFC 2396.
 The resulting String looks as follows:
 <pre>
   file://&lt;host&gt;/&lt;root&gt;/&lt;directory&gt;/&lt;filename.extension&gt;
 </pre>
 or
 <pre>
   file://&lt;host&gt;/&lt;root&gt;/&lt;directory&gt;/&lt;directoryname&gt;/
 </pre>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The URL of a file or directory in the format specified above.</DL>
</DD>
</DL>
<HR>

<A NAME="lastModified()"><!-- --></A><H3>
lastModified</H3>
<PRE>
public long <B>lastModified</B>()</PRE>
<DL>
<DD>Returns the time that the file denoted by the URL specified
 in the Connector.open() method was last modified.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>A long value representing the time the file was last
          modified, measured in milliseconds since the epoch
          (00:00:00 GMT, January 1, 1970), or 0L if an I/O error occurs.
          If modification date is not supported by the underlying platform
          and/or file system, then 0L is also returned.
          If the connection's target does not exist or is not
          accessible, 0L is returned.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if the security of the application does not
          have read access for the connection's target.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/IllegalModeException.html" title="class in com.siemens.icm.io.file">IllegalModeException</A></CODE> - if the application does have read access
          to the connection's target but has opened the connection in
          <code>Connector.WRITE</code> mode.
<DD><CODE><A HREF="../../../../../com/siemens/icm/io/file/ConnectionClosedException.html" title="class in com.siemens.icm.io.file">ConnectionClosedException</A></CODE> - if the connection is closed.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" 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_bottom_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="class-use/FileConnection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file"><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="FileConnection.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_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size=\-1\><a href=\mailto:midp-feedback@risc.sps.mot.com\>Submit a comment or suggestion</a> Version 2.0 of IM Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
