Class ArchiveEntryDocument

java.lang.Object
org.apache.rat.api.Document
org.apache.rat.document.ArchiveEntryDocument
All Implemented Interfaces:
Comparable<Document>

public class ArchiveEntryDocument extends Document
A Document that wraps an Archive entry.
  • 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

      public InputStream inputStream()
      Description copied from class: Document
      Streams the document's contents.
      Specified by:
      inputStream in class Document
      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 class Document
      Returns:
      true if this is a directory.
    • listChildren

      public SortedSet<Document> listChildren()
      Description copied from class: Document
      Gets a sorted set of documents that are children of this document.
      Specified by:
      listChildren in class Document
      Returns:
      A sorted set of child Documents. May be empty.