org.lobobrowser.io
Interface ManagedFile


public interface ManagedFile

Represents a file location in a managed store.


Method Summary
 boolean createNewFile()
          Atomically creates a new file.
 boolean delete()
           
 boolean exists()
           
 ManagedFile getParent()
           
 java.lang.String getPath()
           
 boolean isDirectory()
           
 ManagedFile[] listFiles()
           
 ManagedFile[] listFiles(ManagedFileFilter filter)
           
 boolean mkdir()
           
 boolean mkdirs()
           
 java.io.InputStream openInputStream()
          Creates an input stream for reading from the managed file.
 java.io.OutputStream openOutputStream()
          Creates an output stream for the managed file.
 

Method Detail

getPath

java.lang.String getPath()

isDirectory

boolean isDirectory()

exists

boolean exists()

mkdir

boolean mkdir()

mkdirs

boolean mkdirs()

listFiles

ManagedFile[] listFiles()
                        throws java.io.IOException
Throws:
java.io.IOException

listFiles

ManagedFile[] listFiles(ManagedFileFilter filter)
                        throws java.io.IOException
Throws:
java.io.IOException

createNewFile

boolean createNewFile()
                      throws java.io.IOException
Atomically creates a new file.

Returns:
True if and only if the file did not already exist and was successfully created.
Throws:
java.io.IOException

getParent

ManagedFile getParent()
                      throws java.io.IOException
Throws:
java.io.IOException

openOutputStream

java.io.OutputStream openOutputStream()
                                      throws java.io.IOException
Creates an output stream for the managed file. If the managed file already exists, it is overwritten.

The number of bytes that can be written to the stream may be restricted by a quota.

Throws:
java.io.IOException
See Also:
QuotaExceededException

openInputStream

java.io.InputStream openInputStream()
                                    throws java.io.IOException
Creates an input stream for reading from the managed file.

Throws:
java.io.FileNotFoundException - If the file does not exist.
java.io.IOException

delete

boolean delete()
               throws java.io.IOException
Throws:
java.io.IOException


SourceForge.net LogoCopyright © 2005, 2006, 2007 The Lobo Project. All Rights Reserved.
[Lobo Home]