javax.microedition.io
Interface StorageConnection


public interface StorageConnection
extends InputConnection, OutputConnection

This interface defines the capabilities that filing system or PDA database must have.


Method Summary
 void createDirectory()
          Create a directory node in the storage hierarchy.
 void delete()
          Delete a directory node or record from the storage hierarchy.
 Enumeration elements()
          Returns an enumeration of the names of the directory nodes and records at a specified place in the storage hierarchy.
 long getLength()
          Return the size of a record in the storage hierarchy.
 long getModificationDate()
          Return the modification date of a directory node or record in the storage hierarchy.
 boolean isDirectory()
          Return true if the name is that of a directory node.
 void rename(String name2)
          Rename a directory node or record in the storage hierarchy.
 
Methods inherited from interface javax.microedition.io.InputConnection
openDataInputStream, openInputStream
 
Methods inherited from interface javax.microedition.io.OutputConnection
openDataOutputStream, openOutputStream
 

Method Detail

createDirectory

public void createDirectory()
                     throws IOException
Create a directory node in the storage hierarchy.
Throws:
IOException - if an I/O error occurs when creating the input stream.

delete

public void delete()
            throws IOException
Delete a directory node or record from the storage hierarchy.
Throws:
IOException - if an I/O error occurs.

rename

public void rename(String name2)
            throws IOException
Rename a directory node or record in the storage hierarchy.
Parameters:
name2 - The new name of the node or record
Throws:
IOException - if an I/O error occurs.

getLength

public long getLength()
               throws IOException
Return the size of a record in the storage hierarchy.
Returns:
size
Throws:
IOException - if an I/O error occurs.

getModificationDate

public long getModificationDate()
                         throws IOException
Return the modification date of a directory node or record in the storage hierarchy.
Returns:
date
Throws:
IOException - if an I/O error occurs.

isDirectory

public boolean isDirectory()
                    throws IOException
Return true if the name is that of a directory node.
Returns:
true if it is a node
Throws:
IOException - if an I/O error occurs.

elements

public Enumeration elements()
                     throws IOException
Returns an enumeration of the names of the directory nodes and records at a specified place in the storage hierarchy.
Returns:
an enumeration of the strings containing the names of the elements of the a directory node
Throws:
IOException - if an I/O error occurs.