Package org.apache.rat.document
Class ArchiveEntryDocument
java.lang.Object
org.apache.rat.api.Document
org.apache.rat.document.ArchiveEntryDocument
- All Implemented Interfaces:
Comparable<Document>
A Document that wraps an Archive entry.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.rat.api.Document
Document.Type
-
Field Summary
Fields inherited from class org.apache.rat.api.Document
name, nameMatcher
-
Constructor Summary
ConstructorsConstructorDescriptionArchiveEntryDocument
(ArchiveEntryName entryName, byte[] contents, DocumentNameMatcher nameMatcher) Creates an Archive entry. -
Method Summary
Modifier and TypeMethodDescriptionStreams the document's contents.boolean
Determines if this document is a directory type.Gets a sorted set of documents that are children of this document.Methods inherited from class org.apache.rat.api.Document
compareTo, equals, getMetaData, getName, getNameMatcher, hashCode, isIgnored, reader, toString
-
Constructor Details
-
ArchiveEntryDocument
public ArchiveEntryDocument(ArchiveEntryName entryName, byte[] contents, DocumentNameMatcher nameMatcher) Creates an Archive entry.- Parameters:
entryName
- the name of this entry from outside the archive.contents
- the contents of the entry.nameMatcher
- the name matcher to filter contents with.
-
-
Method Details
-
inputStream
Description copied from class:Document
Streams the document's contents.- Specified by:
inputStream
in classDocument
- Returns:
- a non-null input stream of the document.
-
isDirectory
public boolean isDirectory()Description copied from class:Document
Determines if this document is a directory type.- Specified by:
isDirectory
in classDocument
- Returns:
true
if this is a directory.
-
listChildren
Description copied from class:Document
Gets a sorted set of documents that are children of this document.- Specified by:
listChildren
in classDocument
- Returns:
- A sorted set of child Documents. May be empty.
-