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, writeMethods 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 thisMaskPasswordsOutputStreamwill write topasswords- A collection ofStrings to be maskedregexes- A collection of Regular ExpressionStrings 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 thisMaskPasswordsOutputStreamwill write topasswords- A collection ofStrings to be masked
-
MaskPasswordsOutputStream
public MaskPasswordsOutputStream(OutputStream logger, @CheckForNull Collection<String> passwords, @CheckForNull Collection<String> regexes)
-
-
Method Details
-
eol
- Specified by:
eolin classLineTransformationOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classLineTransformationOutputStream- Throws:
IOException- on error
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException- on error
-