public abstract class Document extends Object implements Comparable<Document>
Modifier and Type | Class and Description |
---|---|
static class |
Document.Type
An enumeraton of document types.
|
Modifier | Constructor and Description |
---|---|
protected |
Document(String name)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Document doc) |
boolean |
equals(Object obj) |
MetaData |
getMetaData()
Gets data describing this resource.
|
String |
getName() |
Path |
getPath()
Get the path that identifies the document.
|
int |
hashCode() |
abstract InputStream |
inputStream()
Streams the document's contents.
|
abstract boolean |
isDirectory()
Determines if this Document is a directory type.
|
abstract SortedSet<Document> |
listChildren()
Gets a sorted set of Documents that are children of this document.
|
abstract Reader |
reader()
Reads the contents of this document.
|
String |
toString()
Representations suitable for logging.
|
protected Document(String name)
name
- the name of the resource.public final String getName()
public int compareTo(Document doc)
compareTo
in interface Comparable<Document>
public Path getPath()
public abstract Reader reader() throws IOException
Reader
not nullIOException
- if this document cannot be read
composite archivepublic abstract InputStream inputStream() throws IOException
IOException
- when stream could not be openedpublic final MetaData getMetaData()
public String toString()
public abstract boolean isDirectory()
true
if this is a directory.Copyright © 2006–2024 Apache Software Foundation. All rights reserved.