palmed.file
Class File

java.lang.Object
  extended by palmed.file.File
All Implemented Interfaces:
IFile

public final class File
extends java.lang.Object
implements IFile

This class represents a file on the file system.

Version:
$Revision: 376 $ $Date: 2005-12-29 12:14:44 +0900 (jeu., 29 déc. 2005) $
Author:
Mathieu Champlon

Constructor Summary
File(java.lang.String path)
          Create a file.
 
Method Summary
 boolean equals(java.lang.Object object)
          
 boolean exists()
          Test if the file exists.
 int hashCode()
          
 java.io.InputStream openInputStream()
          Open an input stream.
 java.io.OutputStream openOutputStream()
          Open an output stream.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

File

public File(java.lang.String path)
Create a file.

Parameters:
path - the absolute file path.
Method Detail

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
Open an input stream.

The stream must be closed after being used.

Specified by:
openInputStream in interface IFile
Returns:
the input stream
Throws:
java.io.IOException - an io exception occured

openOutputStream

public java.io.OutputStream openOutputStream()
                                      throws java.io.IOException
Open an output stream.

The stream must be closed after being used.

Specified by:
openOutputStream in interface IFile
Returns:
the output stream
Throws:
java.io.IOException - an io exception occured

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

exists

public boolean exists()
Test if the file exists.

Specified by:
exists in interface IFile
Returns:
whether the file exists or not


Copyright © 2004-2006 PalmEd. All Rights Reserved.