Package i2p.susi.util

Class RegexOutputStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class RegexOutputStream extends FilterOutputStream
Replace patterns with a simple regex on the fly. Case insensitive.
Since:
0.9.62
  • Field Details

    • idx

      int idx
  • Constructor Details

    • RegexOutputStream

      public RegexOutputStream(OutputStream out, String pattern, String replace, String onNoMatch)
      Parameters:
      out - MUST be buffered because this writes one byte at a time
      pattern - 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 null
  • Method Details