Constructor and Description |
---|
FileDocument(String fileName)
Constructs a
Document based on the contents of the provide file,
where the contests are read from disk. |
FileDocument(String fileName,
boolean cacheContents)
Constructs a
Document based on the contents of the provide file,
optionally caching those contents in memory to allow reading the file
multiple times. |
public FileDocument(String fileName) throws IOException
Document
based on the contents of the provide file,
where the contests are read from disk.fileName
- the name of a file whose contents will be used as a
documentIOException
- if any error occurred while reading fileName
.public FileDocument(String fileName, boolean cacheContents) throws IOException
Document
based on the contents of the provide file,
optionally caching those contents in memory to allow reading the file
multiple times.fileName
- the name of a file whose contents will be used as a
documentIOException
public BufferedReader reader()
BufferedReader
for this document's textCopyright © 2012. All Rights Reserved.