public class RegexOutputStream extends FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
(package private) int | idxindex |
out| Constructor and Description |
|---|
RegexOutputStream(OutputStream out,
String pattern,
String replace,
String onNoMatch) |
| Modifier and Type | Method and Description |
|---|---|
void | close()Flush pending output and close. |
void | write(int val)Write a single byte, with streaming pattern matching. |
flush, write, writepublic 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 close()
throws IOExceptionclose in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void write(int val)
throws IOExceptionwrite in class FilterOutputStreamIOException