X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fstreams%2FReplaceOutputStream.java;h=c6679cc3b3eef4ad15e50e022013663c3b75dade;hp=e7e6c9f5a7c03456902e471864722af00478de48;hb=f8147a0ee57317e96d9ff0bf19573f7168d0354c;hpb=7194ac50b29064a013f177fc9cfc5aaa131a8ec4 diff --git a/src/be/nikiroo/utils/streams/ReplaceOutputStream.java b/src/be/nikiroo/utils/streams/ReplaceOutputStream.java index e7e6c9f..c6679cc 100644 --- a/src/be/nikiroo/utils/streams/ReplaceOutputStream.java +++ b/src/be/nikiroo/utils/streams/ReplaceOutputStream.java @@ -3,6 +3,8 @@ package be.nikiroo.utils.streams; import java.io.IOException; import java.io.OutputStream; +import be.nikiroo.utils.StringUtils; + /** * This {@link OutputStream} will change some of its content by replacing it * with something else. @@ -25,7 +27,7 @@ public class ReplaceOutputStream extends BufferedOutputStream { * the {@link String} to replace with */ public ReplaceOutputStream(OutputStream out, String from, String to) { - this(out, StreamUtils.bytes(from), StreamUtils.bytes(to)); + this(out, StringUtils.getBytes(from), StringUtils.getBytes(to)); } /** @@ -58,7 +60,7 @@ public class ReplaceOutputStream extends BufferedOutputStream { * the values to replace with */ public ReplaceOutputStream(OutputStream out, String[] froms, String[] tos) { - this(out, StreamUtils.bytes(froms), StreamUtils.bytes(tos)); + this(out, StreamUtils.getBytes(froms), StreamUtils.getBytes(tos)); } /**