Class SecretPatterns.MaskingOutputStream
java.lang.Object
java.io.OutputStream
hudson.console.LineTransformationOutputStream
hudson.console.LineTransformationOutputStream.Delegating
org.jenkinsci.plugins.credentialsbinding.masking.SecretPatterns.MaskingOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- SecretPatterns
public static class SecretPatterns.MaskingOutputStream
extends LineTransformationOutputStream.Delegating
Delegating output stream that masks occurrences of a set of secrets.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.console.LineTransformationOutputStream
LineTransformationOutputStream.Delegating
-
Field Summary
Fields inherited from class hudson.console.LineTransformationOutputStream.Delegating
out
-
Constructor Summary
ConstructorDescriptionMaskingOutputStream
(OutputStream out, Supplier<Pattern> secretPattern, String charsetName) -
Method Summary
Methods inherited from class hudson.console.LineTransformationOutputStream.Delegating
close, flush
Methods inherited from class hudson.console.LineTransformationOutputStream
forceEol, trimEOL, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
MaskingOutputStream
public MaskingOutputStream(@NonNull OutputStream out, @NonNull Supplier<Pattern> secretPattern, @NonNull String charsetName) - Parameters:
out
- the base output stream which will not be sent secretssecretPattern
- a lazy computation of either the result ofSecretPatterns.getAggregateSecretPattern(java.util.Collection<java.lang.String>)
, or null to just skip maskingcharsetName
- the character set to detect strings
-
-
Method Details
-
eol
- Specified by:
eol
in classLineTransformationOutputStream
- Throws:
IOException
-
toString
-