public class RegexOutputStream extends FilterOutputStream
Modifier and Type | Field and Description |
---|---|
(package private) int |
idx |
out
Constructor and Description |
---|
RegexOutputStream(OutputStream out,
String pattern,
String replace,
String onNoMatch) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static void |
main(String[] args) |
void |
write(int val) |
flush, write, write
public RegexOutputStream(OutputStream out, String pattern, String replace, String onNoMatch)
out
- MUST be buffered because this writes one byte at a timepattern
- the only special char recognized is '*' and cannot be at the beginning or end
or have two in a row. ASCII-only, no UTF-8.replace
- ASCII-only, no UTF-8.onNoMatch
- force output of this at the end if no replacement made, or nullpublic void write(int val) throws IOException
write
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException