com.petebevin.markdown
Class MarkdownFilter
java.lang.Object
java.io.Reader
java.io.FilterReader
org.apache.tools.ant.filters.BaseFilterReader
org.apache.tools.ant.filters.BaseParamFilterReader
com.petebevin.markdown.MarkdownFilter
- All Implemented Interfaces:
- Closeable, Readable, org.apache.tools.ant.filters.ChainableReader, org.apache.tools.ant.types.Parameterizable
public class MarkdownFilter
- extends org.apache.tools.ant.filters.BaseParamFilterReader
- implements org.apache.tools.ant.filters.ChainableReader
Provides a Markdown-based FilterReader suitable for use by Ant.
<copy file="${src.file}" tofile="${dest.file}">
<filterchain>
<filterreader classname="com.petebevin.markdown.MarkdownFilter"/>
</filterchain>
</copy>
- Author:
- Marty Lamb
Method Summary |
Reader |
chain(Reader reader)
Creates a new MarkdownFilter using the passed in
Reader for instantiation. |
int |
read()
Returns the next character in the filtered stream, after performing
the Markdown processing |
Methods inherited from class org.apache.tools.ant.filters.BaseParamFilterReader |
getParameters, setParameters |
Methods inherited from class org.apache.tools.ant.filters.BaseFilterReader |
getInitialized, getProject, read, readFully, readLine, setInitialized, setProject, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarkdownFilter
public MarkdownFilter()
- Constructor for "dummy" instances.
- See Also:
BaseFilterReader.BaseFilterReader()
MarkdownFilter
public MarkdownFilter(Reader reader)
- Creates a new filtered reader.
- Parameters:
in
- A Reader object providing the underlying stream.
Must not be null
.
chain
public Reader chain(Reader reader)
- Creates a new MarkdownFilter using the passed in
Reader for instantiation.
- Specified by:
chain
in interface org.apache.tools.ant.filters.ChainableReader
- Parameters:
rdr
- A Reader object providing the underlying stream.
Must not be null
.
- Returns:
- a new filter based on this configuration, but filtering
the specified reader
read
public final int read()
throws IOException
- Returns the next character in the filtered stream, after performing
the Markdown processing
- Overrides:
read
in class FilterReader
- Returns:
- the next character in the resulting stream, or -1
if the end of the resulting stream has been reached
- Throws:
IOException
- if the underlying stream throws an IOException
during reading
Copyright © 2011. All Rights Reserved.