rat.document.impl
Class FileDocument

java.lang.Object
  extended by rat.document.impl.FileDocument
All Implemented Interfaces:
IDocument, IResource

public class FileDocument
extends java.lang.Object
implements IDocument

Document wrapping a file of undetermined composition.


Constructor Summary
FileDocument(java.io.File file, IFileUnarchiver unarchiver)
           
 
Method Summary
 java.lang.String getName()
           
 IDocumentCollection readArchive()
          Reads contents of composite document.
 java.io.Reader reader()
          Reads the content of this document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDocument

public FileDocument(java.io.File file,
                    IFileUnarchiver unarchiver)
Method Detail

readArchive

public IDocumentCollection readArchive()
                                throws java.io.IOException
Description copied from interface: IDocument
Reads contents of composite document.

Specified by:
readArchive in interface IDocument
Returns:
IDocumentCollection, not null
Throws:
java.io.IOException - if the document cannot be read
UnreadableArchiveException - if this document is not an archive or if this document is unreadable

reader

public java.io.Reader reader()
                      throws java.io.IOException
Description copied from interface: IDocument
Reads the content of this document.

Specified by:
reader in interface IDocument
Returns:
Reader not null
Throws:
java.io.IOException - if this document cannot be read
CompositeDocumentException - if this document can only be read as a composite archive

getName

public java.lang.String getName()
Specified by:
getName in interface IResource


Copyright © 2006-2008. All Rights Reserved.