public final class CachingObfuscatingWriter extends ObfuscatingWriter
Constructor and Description |
---|
CachingObfuscatingWriter(Obfuscator obfuscator,
Appendable destination)
Creates a new writer.
|
CachingObfuscatingWriter(Obfuscator obfuscator,
Appendable destination,
int capacity)
Creates a new writer.
|
Modifier and Type | Method and Description |
---|---|
Writer |
append(char c) |
Writer |
append(CharSequence csq) |
Writer |
append(CharSequence csq,
int start,
int end) |
protected void |
onClose()
Obfuscates the cached contents.
|
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str) |
void |
write(String str,
int off,
int len) |
checkClosed, close, closed, flush
public CachingObfuscatingWriter(Obfuscator obfuscator, Appendable destination)
obfuscator
- The obfuscator to use for obfuscating text.destination
- The destination to write to.NullPointerException
- If the obfuscator or destination is null
.public CachingObfuscatingWriter(Obfuscator obfuscator, Appendable destination, int capacity)
obfuscator
- The obfuscator to use for obfuscating text.destination
- The destination to write to.capacity
- The initial capacity.NullPointerException
- If the obfuscator or destination is null
.NegativeArraySizeException
- If the capacity is negative.public void write(int c) throws IOException
write
in class Writer
IOException
public void write(char[] cbuf) throws IOException
write
in class Writer
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
IOException
public void write(String str) throws IOException
write
in class Writer
IOException
public void write(String str, int off, int len) throws IOException
write
in class Writer
IOException
public Writer append(CharSequence csq) throws IOException
append
in interface Appendable
append
in class Writer
IOException
public Writer append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
append
in class Writer
IOException
public Writer append(char c) throws IOException
append
in interface Appendable
append
in class Writer
IOException
protected void onClose() throws IOException
onClose
in class ObfuscatingWriter
IOException
- If an I/O error occurs.Copyright © 2020–2023. All rights reserved.