org.apache.rat.document.impl
Class MonolithicFileDocument

java.lang.Object
  extended by org.apache.rat.document.impl.AbstractMonolithicDocument
      extended by org.apache.rat.document.impl.MonolithicFileDocument
All Implemented Interfaces:
IDocument, IResource

public class MonolithicFileDocument
extends AbstractMonolithicDocument


Constructor Summary
MonolithicFileDocument(java.io.File file)
           
 
Method Summary
static IDocument newInstance(java.net.URL url)
          Creates a new instance.
 IDocumentCollection readArchive()
          Reads contents of composite document.
 java.io.Reader reader()
          Reads the content of this document.
 
Methods inherited from class org.apache.rat.document.impl.AbstractMonolithicDocument
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonolithicFileDocument

public MonolithicFileDocument(java.io.File file)
Method Detail

newInstance

public static IDocument newInstance(java.net.URL url)
Creates a new instance. The document is read from the given URL.


readArchive

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

Specified by:
readArchive in interface IDocument
Overrides:
readArchive in class AbstractMonolithicDocument
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.

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


Copyright © 2006-2009 The Apache Software Foundation. All Rights Reserved.