Package org.apache.rat.document.impl
Class ArchiveEntryDocument
java.lang.Object
org.apache.rat.api.Document
org.apache.rat.document.impl.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
(DocumentName outerName, 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.reader()
Reads the contents of this document.Methods inherited from class org.apache.rat.api.Document
compareTo, equals, getMetaData, getName, getNameMatcher, hashCode, toString
-
Constructor Details
-
ArchiveEntryDocument
public ArchiveEntryDocument(DocumentName outerName, byte[] contents, DocumentNameMatcher nameMatcher) Creates an Archive entry.- Parameters:
outerName
- 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.
-
reader
Description copied from class:Document
Reads the contents of this document.
-