Package org.apache.rat.document.impl
Class MonolithicFileDocument
- java.lang.Object
-
- org.apache.rat.document.impl.AbstractMonolithicDocument
-
- org.apache.rat.document.impl.MonolithicFileDocument
-
- All Implemented Interfaces:
Document
public class MonolithicFileDocument extends AbstractMonolithicDocument
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
file
private static java.lang.String
FILE_URL_PREFIX
private static java.lang.String
UTF_8
-
Constructor Summary
Constructors Constructor Description MonolithicFileDocument(java.io.File file)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
inputStream()
Streams the document's contents.static Document
newInstance(java.net.URL url)
java.io.Reader
reader()
Reads the content of this document.-
Methods inherited from class org.apache.rat.document.impl.AbstractMonolithicDocument
getMetaData, getName, isComposite
-
-
-
-
Field Detail
-
UTF_8
private static final java.lang.String UTF_8
- See Also:
- Constant Field Values
-
FILE_URL_PREFIX
private static final java.lang.String FILE_URL_PREFIX
- See Also:
- Constant Field Values
-
file
private final java.io.File file
-
-
Method Detail
-
newInstance
public static Document newInstance(java.net.URL url)
- Parameters:
url
- The document is read from the given URL.- Returns:
- Creates and returns a new instance.
-
reader
public java.io.Reader reader() throws java.io.IOException
Description copied from interface:Document
Reads the content of this document.- 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
-
inputStream
public java.io.InputStream inputStream() throws java.io.IOException
Description copied from interface:Document
Streams the document's contents.- Returns:
- not null
- Throws:
java.io.IOException
- when stream could not be opened
-
-