<!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>
FileSystemRegistry (IM Profile)
</TITLE>

<META NAME="keywords" CONTENT="com.siemens.icm.io.file.FileSystemRegistry class">

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

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="FileSystemRegistry (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/FileSystemRegistry.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;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FileSystemRegistry.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>
Class FileSystemRegistry</H2>
<PRE>
<A HREF="../../../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.siemens.icm.io.file.FileSystemRegistry</B>
</PRE>
<HR>
<DL>
<DT>public class <B>FileSystemRegistry</B><DT>extends <A HREF="../../../../../java/lang/Object.html" title="class in java.lang">Object</A></DL>

<P>
The FileSystemRegistry is a central registry for file system listeners
 interested in the adding and removing (or mounting and unmounting) of
 file systems on a device.
<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/FileConnection.html" title="interface in com.siemens.icm.io.file"><CODE>FileConnection</CODE></A>, 
<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file"><CODE>FileSystemListener</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>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/io/file/FileSystemRegistry.html#addFileSystemListener(com.siemens.icm.io.file.FileSystemListener)">addFileSystemListener</A></B>(<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file">FileSystemListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is used to register a FileSystemListener that is
 notified in case of adding and removing a new file system root.
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&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/FileSystemRegistry.html#listRoots()">listRoots</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns the currently mounted root file systems on a device
 as String objects in an Enumeration.
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/siemens/icm/io/file/FileSystemRegistry.html#removeFileSystemListener(com.siemens.icm.io.file.FileSystemListener)">removeFileSystemListener</A></B>(<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file">FileSystemListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is used to remove a registered FileSystemListener.  </TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="../../../../../java/lang/Object.html" title="class in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../../../java/lang/Object.html#wait(long, int)">wait</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="addFileSystemListener(com.siemens.icm.io.file.FileSystemListener)"><!-- --></A><H3>
addFileSystemListener</H3>
<PRE>
public static boolean <B>addFileSystemListener</B>(<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file">FileSystemListener</A>&nbsp;listener)</PRE>
<DL>
<DD>This method is used to register a FileSystemListener that is
 notified in case of adding and removing a new file system root.
 Multiple file system listeners can be added.  If file
 systems are not supported on a device, false is returned from
 the method (this check is performed prior to security checks).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The new FileSystemListener to be registered in
          order to handle adding/removing file system roots.
<DT><B>Returns:</B><DD>boolean indicating if file system listener was successfully
          added or not
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if application is not given permission
          to read files.
<DD><CODE><A HREF="../../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if listener is <code>null</code>.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file"><CODE>FileSystemListener</CODE></A>, 
<A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html" title="interface in com.siemens.icm.io.file"><CODE>FileConnection</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeFileSystemListener(com.siemens.icm.io.file.FileSystemListener)"><!-- --></A><H3>
removeFileSystemListener</H3>
<PRE>
public static boolean <B>removeFileSystemListener</B>(<A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file">FileSystemListener</A>&nbsp;listener)</PRE>
<DL>
<DD>This method is used to remove a registered FileSystemListener.  If file
 systems are not supported on a device, false is returned from
 the method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The FileSystemListener to be removed.
<DT><B>Returns:</B><DD>boolean indicating if file system listener was successfully
          removed or not
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</A></CODE> - if listener is <code>null</code>.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileSystemListener.html" title="interface in com.siemens.icm.io.file"><CODE>FileSystemListener</CODE></A>, 
<A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html" title="interface in com.siemens.icm.io.file"><CODE>FileConnection</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="listRoots()"><!-- --></A><H3>
listRoots</H3>
<PRE>
public static <A HREF="../../../../../java/util/Enumeration.html" title="interface in java.util">Enumeration</A> <B>listRoots</B>()</PRE>
<DL>
<DD>This method returns the currently mounted root file systems on a device
 as String objects in an Enumeration.
 If there are no roots available on the device, a zero length Enumeration
 is returned.  If file systems are not supported on a device, a zero
 length Enumeration is also returned (this check is performed prior to
 security checks).
 <P>
 The first directory in the file URI is referred to as the <I>root</I>,
 which corresponds to a logical mount point for a particular storage
 unit or memory.  Root strings are defined by the platform or
 implementation and can be a string of zero or more characters ("" can be
 a valid root string on some systems) followed by a trailing "/" to denote
 that the root is a directory. Each root string is guaranteed to uniquely
 refer to a root. Root names are
 device specific and are not required to adhere to any standard.
 Examples of possible root strings and how to open them include:
 <table border=1>
 <tr><th>Possible Root Value</th><th>Opening the Root</th></tr>
 <tr><td>CFCard/</td><td>Connector.open("file:///CFCard/");</td></tr>
 <tr><td>SDCard/</td><td>Connector.open("file:///SDCard/");</td></tr>
 <tr><td>MemoryStick/</td><td>Connector.open("file:///MemoryStick/");</td></tr>
 <tr><td>C:/</td><td>Connector.open("file:///C:/");</td></tr>
 <tr><td>/</td><td>Connector.open("file:////");</td></tr>
 </table>
 <P>
 The following is a sample showing the use of listRoots to retrieve
 the available size of all roots on a device:
 <pre>
   Enumeration rootEnum = FileSystemRegistry.listRoots();
   while (e.hasMoreElements()) {
      String root = (String) e.nextElement();
      FileConnection fc = Connector.open("file:///" + root);
      System.out.println(fc.availableSize());
   }
 </pre>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an Eumeration of mounted file systems as String objects.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../java/lang/SecurityException.html" title="class in java.lang">SecurityException</A></CODE> - if application is not given permission
          to read files.<DT><B>See Also:</B><DD><A HREF="../../../../../com/siemens/icm/io/file/FileConnection.html" title="interface in com.siemens.icm.io.file"><CODE>FileConnection</CODE></A></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/FileSystemRegistry.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;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FileSystemRegistry.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>
