Package hudson.util

Class HeadBufferingStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class HeadBufferingStream
    extends FilterInputStream
    FilterInputStream that buffers the first N bytes to a byte array on the side. This byte array can be then accessed later.

    Useful for sniffing the content of the stream after the error is discovered.

    Kohsuke Kawaguchi