public class SimpleTextRewriter extends AbstractRewriter implements ILinkRewriter
RewriteMethod.TEXT
Constructor and Description |
---|
SimpleTextRewriter(ImportMapping mapping,
boolean export)
A rewriter that can rewrite simple text files by replacing everything at
word boundaries.
|
Modifier and Type | Method and Description |
---|---|
void |
rewrite(InputStream input,
OutputStream output)
|
getImportMode, getMapping, isExport
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImportMode, getMapping, isExport
public SimpleTextRewriter(ImportMapping mapping, boolean export)
mapping
- The mapping between TextGrid URIs and other (local) files.export
- If true, we're exporting from TextGrid (i.e. we need to
replace TextGrid URIs with local URIs).public void rewrite(InputStream input, OutputStream output) throws IOException
SimpleTextRewriter
implementation rewrites links by simple
text replacements.rewrite
in interface ILinkRewriter
rewrite
in class AbstractRewriter
input
- the stream from which the rewriter readsoutput
- the stream to which the rewriter writes the rewritten codeIOException
- if reading or writing failsCopyright © 2017 TextGrid. All rights reserved.