Package de.mhus.lib.core.io
Class StringPropertyRewriter
- java.lang.Object
-
- de.mhus.lib.core.io.StringPropertyRewriter
-
- All Implemented Interfaces:
StreamRewriter
public class StringPropertyRewriter extends Object implements StreamRewriter
Rewrite the incoming stream using the string replacer. The rewriter need to load the full content of the stream in memory twice.- Author:
- mikehummel
-
-
Constructor Summary
Constructors Constructor Description StringPropertyRewriter(StringPropertyReplacer replacer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamrewriteContent(String name, InputStream in)Load the incoming stream and return a new stream for rewritten content.
-
-
-
Constructor Detail
-
StringPropertyRewriter
public StringPropertyRewriter(StringPropertyReplacer replacer)
-
-
Method Detail
-
rewriteContent
public InputStream rewriteContent(String name, InputStream in)
Description copied from interface:StreamRewriterLoad the incoming stream and return a new stream for rewritten content. The rewriter can consume the incoming stream fully until EOF.- Specified by:
rewriteContentin interfaceStreamRewriter- Parameters:
name- name of the filein- Incoming content- Returns:
- Replacement stream e.g the incoming stream
-
-