Class MaskPasswordsOutputStream
java.lang.Object
java.io.OutputStream
hudson.console.LineTransformationOutputStream
com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Custom output stream which masks a predefined set of passwords.
- Author:
- Romain Seguy (http://openromain.blogspot.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.console.LineTransformationOutputStream
LineTransformationOutputStream.Delegating
-
Constructor Summary
ConstructorsConstructorDescriptionMaskPasswordsOutputStream
(OutputStream logger, Collection<String> passwords) MaskPasswordsOutputStream
(OutputStream logger, Collection<String> passwords, Collection<String> regexes) MaskPasswordsOutputStream
(OutputStream logger, Collection<String> passwords, Collection<String> regexes, String runName) -
Method Summary
Methods inherited from class hudson.console.LineTransformationOutputStream
forceEol, trimEOL, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
MaskPasswordsOutputStream
public MaskPasswordsOutputStream(OutputStream logger, @CheckForNull Collection<String> passwords, @CheckForNull Collection<String> regexes, String runName) - Parameters:
logger
- The output stream to which thisMaskPasswordsOutputStream
will write topasswords
- A collection ofString
s to be maskedregexes
- A collection of Regular ExpressionString
s to be maskedrunName
- A string representation of the Run/Build the output stream logger is associated with. Used for logging purposes.
-
MaskPasswordsOutputStream
- Parameters:
logger
- The output stream to which thisMaskPasswordsOutputStream
will write topasswords
- A collection ofString
s to be masked
-
MaskPasswordsOutputStream
public MaskPasswordsOutputStream(OutputStream logger, @CheckForNull Collection<String> passwords, @CheckForNull Collection<String> regexes)
-
-
Method Details
-
eol
- Specified by:
eol
in classLineTransformationOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classLineTransformationOutputStream
- Throws:
IOException
- on error
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
- on error
-