public class FileDocument extends Document
Document.Type
Constructor and Description |
---|
FileDocument(File file)
Creates a File document.
|
Modifier and Type | Method and Description |
---|---|
Path |
getPath()
Get the path that identifies the document.
|
InputStream |
inputStream()
Streams the document's contents.
|
boolean |
isDirectory()
Determines if this Document is a directory type.
|
SortedSet<Document> |
listChildren()
Gets a sorted set of Documents that are children of this document.
|
static String |
normalizeFileName(File file)
Normalizes a file name to linux style.
|
Reader |
reader()
Reads the contents of this document.
|
public FileDocument(File file)
file
- the file to wrap.public static final String normalizeFileName(File file)
file
- The file to normalizepublic Path getPath()
Document
public boolean isDirectory()
Document
isDirectory
in class Document
true
if this is a directory.public SortedSet<Document> listChildren()
Document
listChildren
in class Document
public Reader reader() throws IOException
Document
reader
in class Document
Reader
not nullIOException
- if this document cannot be read
composite archivepublic InputStream inputStream() throws IOException
Document
inputStream
in class Document
IOException
- when stream could not be openedCopyright © 2006–2024 Apache Software Foundation. All rights reserved.