@NotThreadSafe public final class ReplaceAllInputStream extends InputStream
A search and replace filtering InputStream
wrapper.
Requires the underlying InputStream
supports mark and reset; so uses
MarkSupportedInputStream.ensureMarkSupported(InputStream)
to guarantee
this prerequisite.
ReplaceAllOutputStream
Constructor and Description |
---|
ReplaceAllInputStream(byte[] search,
byte[] replace,
InputStream input)
Create a new
ReplaceAllInputStream |
Modifier and Type | Method and Description |
---|---|
int |
read() |
available, close, mark, markSupported, read, read, reset, skip
public ReplaceAllInputStream(byte[] search, byte[] replace, InputStream input)
ReplaceAllInputStream
search
- the byte sequence to search forreplace
- the replacement byte sequence to substitute when the search
sequence if foundinput
- the InputStream
to operate onpublic int read() throws IOException
read
in class InputStream
IOException
Copyright © 2017–2018 earcam. All rights reserved.