Package hudson.util
Class HeadBufferingStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
hudson.util.HeadBufferingStream
- All Implemented Interfaces:
 Closeable,AutoCloseable
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.
- Author:
 - Kohsuke Kawaguchi
 
- 
Field Summary
Fields inherited from class java.io.FilterInputStream
in - 
Constructor Summary
Constructors - 
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo 
- 
Constructor Details
- 
HeadBufferingStream
 
 - 
 - 
Method Details
- 
read
- Overrides:
 readin classFilterInputStream- Throws:
 IOException
 - 
read
- Overrides:
 readin classFilterInputStream- Throws:
 IOException
 - 
fillSide
Read until we fill up the side buffer.- Throws:
 IOException
 - 
getSideBuffer
public byte[] getSideBuffer()Gets the side buffer content. 
 -