コード例 #1
0
  /**
   * Creates a <code>File</code> object for a file in the persistent storage area provided for the
   * bundle by the framework. If the adaptor does not have file system support, this method will
   * return <code>null</code>.
   *
   * <p>A <code>File</code> object for the base directory of the persistent storage area provided
   * for the context bundle by the framework can be obtained by calling this method with the empty
   * string ("") as the parameter. See {@link #getBundle()} for a definition of context bundle.
   *
   * <p>If the Java runtime environment supports permissions, the framework the will ensure that the
   * bundle has <code>java.io.FilePermission</code> with actions "read","write","execute","delete"
   * for all files (recursively) in the persistent storage area provided for the context bundle by
   * the framework.
   *
   * @param filename A relative name to the file to be accessed.
   * @return A <code>File</code> object that represents the requested file or <code>null</code> if
   *     the adaptor does not have file system support.
   * @exception java.lang.IllegalStateException If the bundle context has stopped.
   */
  public File getDataFile(String filename) {
    checkValid();

    return (framework.getDataFile(bundle, filename));
  }