Class Document

java.lang.Object
  extended by Document

public class Document
extends java.lang.Object

Wrapper around a File object.


Field Summary
private  java.util.Calendar c
          Used for convenience.
private  java.io.File f
          File represented by this Document object.
 
Constructor Summary
Document(java.io.File f)
          Constructor for Document.
 
Method Summary
 java.lang.String getAbsolutePath()
          Return the absolute path of the File object.
 java.lang.String getName()
          Return the name of the File object.
 long lastModified()
          Return the last modified date of the File object.
 java.lang.String toString()
          Return a string representation of this document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

f

private java.io.File f
File represented by this Document object.


c

private java.util.Calendar c
Used for convenience. It is recommended a Calendar object be instantiated and set using the last modified date of the File.

Constructor Detail

Document

public Document(java.io.File f)
Constructor for Document. In addition to saving the parameter f into a data member of the object, create a Calendar instance and set its time to the last modified time of the File.

Parameters:
f -
Method Detail

lastModified

public long lastModified()
Return the last modified date of the File object.

Returns:
long representing the last modified date

getName

public java.lang.String getName()
Return the name of the File object.

Returns:

getAbsolutePath

public java.lang.String getAbsolutePath()
Return the absolute path of the File object.

Returns:

toString

public java.lang.String toString()
Return a string representation of this document. Use the string representation of the File object and the last modified date.

Overrides:
toString in class java.lang.Object