Package org.apache.rat.document.impl
Class FileDocument
- java.lang.Object
-
- org.apache.rat.document.impl.FileDocument
-
-
Constructor Summary
Constructors Constructor Description FileDocument(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
file
private final java.io.File file
-
name
private final java.lang.String name
-
metaData
private final MetaData metaData
-
-
Method Detail
-
isComposite
public boolean isComposite()
Description copied from interface:Document
Is this a composite document?- Specified by:
isComposite
in interfaceDocument
- 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 interfaceDocument
- Returns:
Reader
not null- Throws:
java.io.IOException
- if this document cannot be readCompositeDocumentException
- if this document can only be read as a composite archive
-
getMetaData
public MetaData getMetaData()
Description copied from interface:Document
Gets data describing this resource.- Specified by:
getMetaData
in interfaceDocument
- Returns:
- not null
-
inputStream
public java.io.InputStream inputStream() throws java.io.IOException
Description copied from interface:Document
Streams the document's contents.- Specified by:
inputStream
in interfaceDocument
- Returns:
- not null
- Throws:
java.io.IOException
- when stream could not be opened
-
toString
public java.lang.String toString()
Representations suitable for logging.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
representation of this object.
-
-