Package com.onlinepayments.logging
Class BodyObfuscator
java.lang.Object
com.onlinepayments.logging.BodyObfuscator
A class that can be used to obfuscate properties in JSON bodies. Thread-safe if all its obfuscation rules are.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic BodyObfuscator.Buildercustom()Returns a builder to create custom body obfuscators.static BodyObfuscatorReturns a default body obfuscator.obfuscateBody(InputStream bodyStream, Charset charset) Obfuscates the body from the given stream as necessary.obfuscateBody(Reader bodyStream) Obfuscates the body from the given stream as necessary.obfuscateBody(CharSequence body) Obfuscates the given body as necessary.
-
Method Details
-
obfuscateBody
Obfuscates the given body as necessary. -
obfuscateBody
Obfuscates the body from the given stream as necessary.- Parameters:
charset- The charset to use to read the body input stream.- Throws:
IOException
-
obfuscateBody
Obfuscates the body from the given stream as necessary.- Throws:
IOException
-
custom
Returns a builder to create custom body obfuscators. This builder will contain some pre-defined obfuscation rules. These cannot be removed, but replacing them is possible. -
defaultObfuscator
-