public class FileSource extends SourceImpl
Constructor and Description |
---|
FileSource(StreamSourceFormat format,
File path,
ControllerState controllerState)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SourceElement |
createRootElement()
Reads and parses the input file and creates the element tree from it.
|
byte[] |
getContentChecksum()
Returns the checksum of the content.
|
String |
getDescription()
Returns the path of the file as a description.
|
Date |
getLastModified()
Returns the date when the source was last modified.
|
File |
getPath()
Returns the path to the source file.
|
File |
getSourceFile()
Returns the source file, if it exists.
|
StreamSourceFormat |
getSourceFormat()
Returns the format of the source.
|
String |
toString() |
getRootElement
public FileSource(StreamSourceFormat format, File path, ControllerState controllerState)
format
- the source format, not null.path
- the path to the file to read, not null.controllerState
- the controller state, not null.NullPointerException
- if path or format is null.public StreamSourceFormat getSourceFormat()
public File getPath()
public SourceElement createRootElement() throws SourceException
createRootElement
in class SourceImpl
SourceException
- if the input file cannot be read or parsed.public String getDescription()
Source.getDescription()
public File getSourceFile()
public Date getLastModified()
public byte[] getContentChecksum()
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.