public class ReaderFile extends Object implements IReader
| Modifier and Type | Field and Description |
|---|---|
protected IResolver |
resolver
Relative URI resolver.
|
| Constructor and Description |
|---|
ReaderFile() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getContent(File file)
Get contents of a file.
|
IResolver |
getResolver()
Resolver of relative links.
|
protected void |
getURI(StringBuilder sb,
URI newHref)
Get URI data.
|
void |
initialize()
Initialize something.
|
boolean |
isReplacer()
Says to replace content after reading.
|
String |
read(IContext context,
Object obj,
Object[] args)
Read the content of an object as String.
|
void |
setResolver(IResolver resolver)
Change the resolver.
|
protected void |
updateHref(nu.xom.Element element,
URI newHref)
Update href link of included files.
|
protected IResolver resolver
public IResolver getResolver()
public void setResolver(IResolver resolver)
resolver - A resolver.public void initialize()
IResetableinitialize in interface IResetablepublic String read(IContext context, Object obj, Object[] args) throws ReaderException
IReaderread in interface IReadercontext - The test context.obj - An object reader.args - Arguments of reading.ReaderException - On reading errors.protected void updateHref(nu.xom.Element element,
URI newHref)
throws PluginException
element - Href container.newHref - The href source.PluginException - On calculation error.protected void getURI(StringBuilder sb, URI newHref) throws IOException
sb - String information.newHref - The reference.IOException - On reading errors.protected String getContent(File file) throws IOException
file - A file.IOException - On reading errors.public boolean isReplacer()
IReaderisReplacer in interface IReaderCopyright © 2016. All rights reserved.