Class FilteredOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.cloudbees.jenkins.support.filter.FilteredOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class FilteredOutputStream extends FilterOutputStream
Wraps an OutputStream by filtering written lines using a provided ContentFilter. Data written to an instance of this will be decoded on the fly using the provided charset, and each line written is filtered.
Since:
TODO
See Also:
  • Field Details

  • Constructor Details

    • FilteredOutputStream

      public FilteredOutputStream(@NonNull OutputStream out, @NonNull ContentFilter contentFilter)
      Constructs a filtered stream using the provided filter and assuming UTF-8.
      Parameters:
      out - output stream to write filtered content to
      contentFilter - content filter to apply to lines written through this stream
    • FilteredOutputStream

      public FilteredOutputStream(@NonNull OutputStream out, @NonNull Charset charset, @NonNull ContentFilter contentFilter)
      Constructs a filtered stream using the provided filter and charset.
      Parameters:
      out - output stream to write filtered content to
      charset - character set to use for decoding and encoding bytes written to this stream
      contentFilter - content filter to apply to lines written through this stream
  • Method Details