@Internal public class ReplacingInputStream extends FilterInputStream
| Constructor and Description |
|---|
ReplacingInputStream(InputStream in,
byte[] pattern,
byte[] replacement)
Replace occurrences of pattern in the input.
|
ReplacingInputStream(InputStream in,
String pattern,
String replacement)
Replace occurrences of pattern in the input.
|
| Modifier and Type | Method and Description |
|---|---|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
String |
toString() |
available, close, mark, markSupported, reset, skippublic ReplacingInputStream(InputStream in, String pattern, String replacement)
in - inputpattern - pattern to replace.replacement - the replacement or nullpublic ReplacingInputStream(InputStream in, byte[] pattern, byte[] replacement)
If you want to normalize line endings DOS/MAC (\n\r | \r) to UNIX (\n), you can call the following:
new ReplacingInputStream(new ReplacingInputStream(is, "\n\r", "\n"), "\r", "\n")
in - inputpattern - pattern to replacereplacement - the replacement or nullpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved