org.apache.rat.document.impl
Class ArchiveEntryDocument

java.lang.Object
  extended by org.apache.rat.document.impl.ArchiveEntryDocument
All Implemented Interfaces:
Document

public class ArchiveEntryDocument
extends java.lang.Object
implements Document


Constructor Summary
ArchiveEntryDocument(java.io.File file, byte[] contents)
           
 
Method Summary
 MetaData getMetaData()
          Gets data describing this resource.
 java.lang.String getName()
           
 java.io.InputStream inputStream()
          Streams the document's contents.
 boolean isComposite()
          Is this a composite document?
 java.io.Reader reader()
          Reads the content of this document.
 java.lang.String toString()
          Representations suitable for logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArchiveEntryDocument

public ArchiveEntryDocument(java.io.File file,
                            byte[] contents)
                     throws RatException
Throws:
RatException
Method Detail

getMetaData

public MetaData getMetaData()
Description copied from interface: Document
Gets data describing this resource.

Specified by:
getMetaData in interface Document
Returns:
not null

getName

public java.lang.String getName()
Specified by:
getName in interface Document

inputStream

public java.io.InputStream inputStream()
                                throws java.io.IOException
Description copied from interface: Document
Streams the document's contents.

Specified by:
inputStream in interface Document
Returns:
not null
Throws:
java.io.IOException - when stream could not be opened

isComposite

public boolean isComposite()
Description copied from interface: Document
Is this a composite document?

Specified by:
isComposite in interface Document
Returns:
true if composite, false otherwise

reader

public java.io.Reader reader()
                      throws java.io.IOException
Description copied from interface: Document
Reads the content of this document.

Specified by:
reader in interface Document
Returns:
Reader not null
Throws:
java.io.IOException - if this document cannot be read
CompositeDocumentException - if this document can only be read as a composite archive

toString

public java.lang.String toString()
Representations suitable for logging.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object.


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.